Skip to content
This repository was archived by the owner on Nov 5, 2024. It is now read-only.

hantmac/fuckdb

Folders and files

NameName
Last commit message
Last commit date
Jun 24, 2020
Jun 27, 2021
Sep 2, 2022
May 31, 2021
Oct 13, 2024
Jan 3, 2020
Feb 7, 2022
Jul 1, 2021
Dec 12, 2019
Dec 13, 2019
Apr 30, 2021
Mar 31, 2020
Dec 11, 2019
May 5, 2021
May 31, 2021
Aug 25, 2020
Mar 31, 2020
Mar 31, 2020
Nov 26, 2023
Nov 26, 2023

Repository files navigation

fuckdb

Example to show fuckdb

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.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.

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 server

Then 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. server

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

jetbrains