轻:从MyBatisiBatis生成GoGolang数据库sql查询代码,精神

时间:2021-02-03 10:51:49
【文件属性】:
文件名称:轻:从MyBatisiBatis生成GoGolang数据库sql查询代码,精神
文件大小:379KB
文件格式:ZIP
更新时间:2021-02-03 10:51:49
mysql sql orm osm generate 光 light是一种用于从go源文件中生成数据库查询代码的工具,该工具具有使用SQL和Variables注释的接口方法。 Interface methods commented with SQL and variables => go generate => Database query code implementation 用法 安装light工具。 确保$ PATH环境中的$ GOBIN。 `go get -u -v github.com/omigo/light` 运行light -h ,检查安装。 # light -h Usage of light: -log Generated file with log 定义接口,并使用SQL和变量注释方法,然后编写指令//go:generate light 。 //go:generate light -log -timeout 30 type User interface { // UPDATE users // SET [username=?,] // [phone=?,]
【文件预览】:
light-master
----.travis.yml(86B)
----example()
--------conf()
--------model()
--------schema()
--------store()
----sqlparser()
--------select.go(2KB)
--------insert.go(3KB)
--------parser.go(5KB)
--------update_test.go(460B)
--------token.go(4KB)
--------update.go(396B)
--------insert_test.go(553B)
--------create.go(443B)
--------replace.go(2KB)
--------delete_test.go(288B)
--------delete.go(396B)
--------create_test.go(388B)
--------scanner.go(5KB)
--------select_test.go(749B)
--------ast.go(536B)
----light()
--------execer.go(501B)
----goparser()
--------method.go(3KB)
--------parse_test.go(1KB)
--------profile.go(3KB)
--------parse.go(6KB)
--------results.go(340B)
--------params.go(817B)
--------variable.go(4KB)
----generator()
--------generate.go(2KB)
--------template.go(12KB)
--------generate_test.go(286B)
----main.go(1KB)
----.gitignore(468B)
----CHANGELOG.md(836B)
----go.sum(3KB)
----README.md(2KB)
----light.jpg(382KB)
----null()
--------ints.go(7KB)
--------floats.go(3KB)
--------null.go(1KB)
--------null_test.go(118B)
--------string.go(1KB)
--------clickhousetime.go(2KB)
--------timestamp.go(1KB)
--------bool.go(1KB)
--------time.go(2KB)
--------time_test.go(281B)
----go.mod(203B)

网友评论