Coder Social home page Coder Social logo

sql2gorm's People

Contributors

cascax avatar

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

sql2gorm's Issues

go get失败

你好~
我正在重构自己的项目,我的项目里已有.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不熟悉所导致的,毕竟我是个新手

no -db from mysql notification follows

图片


\[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

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.