【文件属性】:
文件名称:populator:易于检查SQL查询
文件大小:40KB
文件格式:ZIP
更新时间:2021-03-27 16:22:55
Go
人口
填充器是使您的数据库通过yaml config输入填充的工具。
唯一要做的就是描述数据库架构和要写入yaml文件的记录数,然后运行指定该yaml的工具。
当您要检查SQL查询本身时,这很有用。 您无需编写任何填充数据库模式的存储过程。
另一方面,该工具不足以检查Application Server的性能,因为该工具根本不关心应用程序层的验证。
安装
$ go get github.com/terakoya76/populator
如何使用
您需要准备配置文件,配置文件如下。
database :
driver : mysql
host : 127.0.0.1
user : root
password : root
name : testdb
port : 3306
tables :
- name : table_a
columns :
-
【文件预览】:
populator-master
----.goreleaser.yml(581B)
----config()
--------config.go(5KB)
----cmd()
--------root_test.go(46KB)
--------root.go(3KB)
----.github()
--------labels.yml(1KB)
--------dependabot.yml(236B)
--------workflows()
----database()
--------base.go(2KB)
--------mysql_client.go(11KB)
--------mysql_client_test.go(25KB)
----LICENSE(11KB)
----rand()
--------rand.go(8KB)
----main.go(1KB)
----examples()
--------only_populate_records()
--------from_table_creation()
----.gitignore(23B)
----.golangci.yml(3KB)
----Makefile(289B)
----go.sum(16KB)
----README.md(9KB)
----utils()
--------utils.go(1000B)
----go.mod(684B)