Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zendata
提交
580973b6
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 搜索 >>
提交
580973b6
编写于
7月 20, 2020
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.1
上级
c5e4b23a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
9 addition
and
11 deletion
+9
-11
res/doc/usage.txt
res/doc/usage.txt
+4
-5
res/doc/usage_en.txt
res/doc/usage_en.txt
+5
-6
未找到文件。
res/doc/usage.txt
浏览文件 @
580973b6
...
...
@@ -10,16 +10,12 @@ zendata是一款通用的数据生成工具,您可以使用yaml文件来定义
-F --field 可通过该参数指定要输出的字段列表,用逗号分隔。 默认是所有的字段。
-t --table 输出格式为sql时,需通过该参数指定要插入数据的表名。
-H --human 输出可读格式,打印字段名,并使用tab键进行分割。
-r --recursive 递归模式。如不指定,默认为平行模式。平行模式下各个字段独立循环。
递归模式下每个字段的取值依赖于前一字段。可增强数据的随机性。
-p --port 在指定端口上运行HTTP服务。可通过http://ip/接口获得JSON格式的数据。服务模式下只支持数据生成。
-b --bind 监听的ip地址,默认监听所有的ip地址。
-R --root 运行HTTP服务时根目录。客户端可调用该根目录下面的配置文件。如果不指定,取zd可执行文件所在目录。
-i --input 指定一个schema文件,输出每个表的yaml配置文件。需通过-o参数指定一个输出的目录。
-s --server 数据库服务器类型,支持mysql|oracle|sqlite|sqlserver,默认为mysql。可用于解析yaml文件或者生成SQL。
-D --decode 根据指定的配置文件,将通过-i参数指定的数据文件解析成json格式,可通过-H参数输出可读格式。
-e --example 打印示例的数据格式配置文件。
-l --list 列出所有支持的数据格式。
...
...
@@ -38,7 +34,10 @@ $>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 -s mysql 输出插入到user表里面的sql。
$>zd.exe -i db.sql -s mysql -o db 根据db.sql的定义生成每个表的yaml文件,存储到db目录里面。
$>zd.exe -c demo\default.yaml -i test.txt --decode 将-i指定的文件根据-d参数的配置进行解析。
$>zd.exe -l # 列出所有內置数据。
$>zd.exe -v system.address.v1 # 查看內置Excel文件system/address/v1.xlsx中的数据表。
$>zd.exe -v system.address.v1.china # 查看內置Excel文件china数据表中的数据。
服务模式举例:
...
...
res/doc/usage_en.txt
浏览文件 @
580973b6
...
...
@@ -25,10 +25,6 @@ Parameters
-i --input Specify a sql schema file and output the YAML config file for each table.
You need to specify an output directory by using -o.
-s --server Database server type. Support mysql|oracle|sqlite|sqlserver.
The default is mysql. This parameter can be used to parse YAML files or generate SQL.
-D --decode Referring to the specified configuration file, parse the data file specified by -i and output json.
Also you can output the readable format via -H.
-e --example Print the data format config file of the example.
-l --list List all supported data formats.
...
...
@@ -46,8 +42,11 @@ $>zd.exe -d demo/default.yaml -c demo/test.yaml -n 100 -o test.json # Output da
$>zd.exe -d demo/default.yaml -c demo/test.yaml -n 100 -o test.xml # Output data in XML.
$>zd.exe -d demo/default.yaml -n 100 -o test.sql -t user -s mysql # Output the sql inserted into the table user.
$>zd.exe -i db.sql -s mysql -o db # Generate YAML files for each table by parsing db.sql and store them in the db directory.
$>zd.exe -c demo/default.yaml -i test.txt --decode # Parse the file specified by -i according to the config of -d.
$>zd.exe -i db.sql -o db # Generate YAML files for each table by parsing db.sql and store them in the db directory.
$>zd.exe -l # List all build-in data types.
$>zd.exe -v system.address.v1 # View data types in build-in Excel file system/address/v1.xlsx.
$>zd.exe -v system.address.v1.china # View data items in Excel sheet "china".
Service Example
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录