https://github.com/hantmac/fuckdb
From database generate go struct,help you fuck db fields
https://github.com/hantmac/fuckdb
golang gorm struct
Last synced: about 2 months ago
JSON representation
From database generate go struct,help you fuck db fields
- Host: GitHub
- URL: https://github.com/hantmac/fuckdb
- Owner: hantmac
- License: apache-2.0
- Archived: true
- Created: 2019-12-11T15:19:46.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-29T16:17:11.000Z (7 months ago)
- Last Synced: 2024-11-07T03:41:45.085Z (7 months ago)
- Topics: golang, gorm, struct
- Language: Go
- Homepage:
- Size: 47.6 MB
- Stars: 340
- Watchers: 7
- Forks: 37
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-go - fuckdb - generates a go compatible struct type with the required column names, data types, and annotations just fill in the database information in the web UI. Making go web develop very easy by saving a lot of time writing structure.fuckdbis based/inspired by the work of Seth Shelnutt's db2struct, and Db2Struct is based/inspired by the work of ChimeraCoder's gojson package gojson. (SQL Builders)
README
# fuckdb
- [中文](https://github.com/hantmac/fuckdb/blob/master/README_zh.md)
- [相关文章](https://mp.weixin.qq.com/s?__biz=MzIxNTU0ODY1NQ==&mid=2247484336&idx=1&sn=07097166a6e6b5a113599e7d2f572c2d&chksm=9797d430a0e05d26b30999ca042cb9ab4b1927a97b1bad439c3e06e51ae9ef46022e2a315e96&token=918317406&lang=zh_CN#rd)
- English
`fuckdb` helps you fuck the db when you write go struct.
`fuckdb` generates a go compatible struct type with the required column names, data types, and annotations just fill in the database information in the web UI. Making go web develop very easy by saving a lot of time writing structure.`fuckdb`is based/inspired by the work of Seth Shelnutt's db2struct, and Db2Struct is based/inspired by the work of ChimeraCoder's gojson package gojson.
# Web UI
- Easy to use
Only a few clicks on the web UI can generate the corresponding golang struct with `ORM` or `json` or `xml` ... tags.
# How to use?### Source code deploy
- git clone the source code
- cd fuckdb/
- make build
- fuckdb serverThen UI will be opened.
### CMD - fuckdb Lite
> tips: fuckdb Lite is a undependent tool, no need to install fuckdb first.
#### install
- macos
```
brew tap hantmac/tap && brew install fuckdb
```
- Linux```
wget https://github.com/hantmac/fuckdb/releases/download/v1.0.1/fuckdb_linux.tar.gz && tar -zxvf fuckdb_linux.tar.gz
```
- windows
download the windows file in release- First, run `fuckdb generate` to generate `fuckdb.json` add your mysql info
```
{
"db": {
"host": "localhost",
"port": 3306,
"password": "password",
"user": "root",
"table": "cars",
"database": "example",
"packageName": "test",
"structName": "test",
"jsonAnnotation": true,
"gormAnnotation": true
}
}
```- then run `fuckdb go` and get your code!
If you want use UI on localhost you can use `fuckdb server` and will open browser in one second.
### Docker deploy
- modify your backend ip in `frontend/src/config/index.js`
- docker-compose up -d
- Use `localhost:8000` you will get the next page

- Just Put your mariaDB/mysql info into it and you will get your golang code.
- Click generate.
- Boom!Enjoy your coffee and copy your struct code.
More info => 'Go_Official_Blog' on WeChat:

### Support
[]( https://www.jetbrains.com/?from=fuckdb)