starfishs / sql2struct

sql2struct is a tool for sql statement to golang struct

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Go Report Card GoDoc codecov License

sql2struct

mysql/postgresql database to golang struct for gorm model

install

go install github.com/starfishs/sql2struct@latest

usage

sql2struct --dsn="mysql://root:123456@tcp(localhost:3306)/test?charset=utf8mb4"

docker

docker run  -v /path/to/store:/workspace -w /workspace  starfishsfive/sql2struct:v1.0.0 --dsn="postgresql://root:123456@localhost:5432/test?sslmode=disable"

support

  • mysql
  • postgreSQL

Contributors

starfishs
Starfish
miajio
Snaro Chris Xiao
calabashbrother
Null

About

sql2struct is a tool for sql statement to golang struct

License:GNU General Public License v3.0


Languages

Language:Go 99.4%Language:Makefile 0.6%