Code Monkey home page Code Monkey logo

fuckdb's Introduction

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

fuckdb's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

fuckdb's Issues

support customize `curdFunc` template

While fuckdb provide some basic CURD functions, there may be some customized requirements. So we should support users to use their own templates. If not specify, then default template will be used.

安装问题

linux安装fuckdb Lite
使用这个命令吗
image
执行完以后的结果
image

使用fuckdb Lite是否是在fuckdb的基础上,要先安装fuckdb才能使用fuckdb Lite吗,文档让人有点疑惑

同学,您这个项目引入了176个开源组件,存在3个漏洞,辛苦升级一下

检测到 hantmac/fuckdb 一共引入了176个开源组件,存在3个漏洞

漏洞标题:jwt-go 安全漏洞
缺陷组件:github.com/dgrijalva/[email protected]+incompatible
漏洞编号:CVE-2020-26160
漏洞描述:jwt-go是个人开发者的一个Go语言的JWT实现。
jwt-go 4.0.0-preview1之前版本存在安全漏洞。攻击者可利用该漏洞在使用[]string{} for m[\"aud\"](规范允许)的情况下绕过预期的访问限制。
影响范围:(∞, 4.0.0-preview1)
最小修复版本:4.0.0-preview1
缺陷组件引入路径:main@->github.com/dgrijalva/[email protected]+incompatible

另外还有3个漏洞,详细报告:https://mofeisec.com/jr?p=ide465

fuckdb Lite 启动 web UI 失败

$ ./fuckdb server
FATA[0000] init config error:%s Config File "config" Not Found in "[C:\\Users\\admin\\Desktop\\dbg\\config]"

json驼峰

fuckdb generate生成的fuckdb.json可以加个开关使生成的json不是下划线而是小驼峰吗

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.