cascax / sql2gorm Goto Github PK
View Code? Open in Web Editor NEWparse SQL to gorm struct
License: MIT License
parse SQL to gorm struct
License: MIT License
为啥mysql数据库的decimal会被映射成string?
你好~
我正在重构自己的项目,我的项目里已有.sql文件,于是想通过这个工具快速生成 gorm 可用的接口体代码,遇到了问题。
在执行go get -u github.com/cascax/sql2gorm/...
会得到这样的提示信息
go: downloading golang.org/x/text v0.0.0-20180302201248-b7ef84aaf62a go get: github.com/knocknote/[email protected] updating to github.com/knocknote/[email protected]: parsing go.mod: module declares its path as: github.com/blastrain/vitess-sqlparser but was required as: github.com/knocknote/vitess-sqlparser
但是我通过 git clone, 然后执行 go install 还是成功了
我不确定这是问题,还是我自己对 go modules不熟悉所导致的,毕竟我是个新手
支持clickhouse吗?
\[email protected]>sql2gorm -db-dsn=root:123456@/gitea -db-table=task
flag provided but not defined: -db-dsn
Usage of sql2gorm:
-col-prefix string
column name prefix
-f string
input file
-json
generate json tag
-no-null
do not use Null type
-null-style string
null type: sql.NullXXX(use 'sql') or *xxx(use 'ptr')
-o string
output file
-pkg string
package name, default: model
-sql string
input SQL
-table-prefix string
table name prefix
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.