Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zendata
提交
d013bd5f
Z
zendata
项目概览
易企天创
/
zendata
8 个月 前同步成功
通知
17
Star
2
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zendata
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
d013bd5f
编写于
5月 07, 2022
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change param name to dsn
上级
011acaac
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
3 addition
and
3 deletion
+3
-3
res/en/usage.txt
res/en/usage.txt
+1
-1
res/zh/usage.txt
res/zh/usage.txt
+1
-1
src/zd.go
src/zd.go
+1
-1
未找到文件。
res/en/usage.txt
浏览文件 @
d013bd5f
...
...
@@ -10,7 +10,7 @@ Parameters:
-F --field This parameter can be used to specify the fields, separated by commas. The default is all fields.
-t --table If the output format is sql, using it to specify the table name to insert data to.
--d
ns
Specify MySQL data source connection string, used to insert data to table directly.
--d
sn
Specify MySQL data source connection string, used to insert data to table directly.
--clear Remove data in MySQL table before insert.
-T --trim Remove the prefix and postfix of every field when outputting data or decode data to json string.
-H --human Output a readable format, print the field name, and use the tab key to split.
...
...
res/zh/usage.txt
浏览文件 @
d013bd5f
...
...
@@ -43,7 +43,7 @@ $>zd.exe -d demo\default.yaml -c demo\test.yaml -n 100 -o test.json # 输出jso
$>zd.exe -d demo\default.yaml -c demo\test.yaml -n 100 -o test.xml # 输出xml格式的数据。
$>zd.exe -d demo\default.yaml -n 100 -o test.sql -t user # 输出针对user表的insert语句。
$>zd.exe -d demo\default.yaml -n 100 -o test.sql -t user --trim # 输出针对user表的insert语句,去掉前缀和后缀。
$>zd.exe -c test\test-sql.yaml -t zendata.table_a --trim -d
ns
mysql://root:P2ssw0rd@127.0.0.1:3306/zendata#utf8 --clear # 插入数据到MySQL数据表。
$>zd.exe -c test\test-sql.yaml -t zendata.table_a --trim -d
sn
mysql://root:P2ssw0rd@127.0.0.1:3306/zendata#utf8 --clear # 插入数据到MySQL数据表。
$>zd.exe -i demo\zentao.sql -o db # 根据sql的定义生成各表的yaml文件,存储到db目录里面。
$>zd.exe -i demo\article.txt -o demo # 转换文章为yaml配置,输出到demo目录下。
...
...
src/zd.go
浏览文件 @
d013bd5f
...
...
@@ -128,7 +128,7 @@ func main() {
flagSet
.
StringVar
(
&
vari
.
Table
,
"table"
,
""
,
""
)
flagSet
.
StringVar
(
&
vari
.
Server
,
"s"
,
"mysql"
,
""
)
flagSet
.
StringVar
(
&
vari
.
Server
,
"server"
,
"mysql"
,
""
)
flagSet
.
StringVar
(
&
vari
.
DBDsn
,
"d
ns
"
,
""
,
""
)
flagSet
.
StringVar
(
&
vari
.
DBDsn
,
"d
sn
"
,
""
,
""
)
flagSet
.
BoolVar
(
&
vari
.
DBClear
,
"clear"
,
false
,
""
)
flagSet
.
StringVar
(
&
vari
.
ProtoCls
,
"cls"
,
""
,
""
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录