Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zendata
提交
98d25c46
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 搜索 >>
提交
98d25c46
编写于
8月 03, 2020
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
udpate doc
上级
7d0b450e
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
25 addition
and
25 deletion
+25
-25
demo/default.yaml
demo/default.yaml
+1
-1
res/en/usage.txt
res/en/usage.txt
+13
-13
res/res.go
res/res.go
+4
-4
res/zh/sample.yaml
res/zh/sample.yaml
+1
-1
res/zh/usage.txt
res/zh/usage.txt
+6
-6
未找到文件。
demo/default.yaml
浏览文件 @
98d25c46
...
...
@@ -114,7 +114,7 @@ fields:
-
field
:
field_use_excel
# 从excel数据源里面取数据。
from
:
system.address.v1.china
# 从data/system/address/v1.xlsx文件中读取名为china的工作簿。
select
:
city
# 查询city字段。
where
:
state like '%山东%'
# 条件是省份包含山东。
where
:
state like '%山东%'
# 条件是省份包含山东。
postfix
:
"
\t
"
-
field
:
field_with_children
# 嵌套字段
...
...
res/en/usage.txt
浏览文件 @
98d25c46
zend
ata is a generic data generator. You can use YAML file to define the data format and use zendata to create it.
ZenD
ata is a generic data generator. You can use YAML file to define the data format and use zendata to create it.
Parameters
Parameters
:
-d --default The default config file for data format.
-c --config The current config file for data format, and it can override the config in the default file.
...
...
@@ -32,7 +32,7 @@ Parameters
-h --help Print help.
-e --example Print the data format config file of the example.
Command Line Examples
Command Line Examples
:
$>zd.exe -d demo/default.yaml # Generate 10 lines of data according to the config file specified by -d.
$>zd.exe -c demo/default.yaml # Generate 10 lines of data according to the config file specified by -c.
...
...
@@ -47,17 +47,17 @@ $>zd.exe -d demo/default.yaml -o test.sql -t user -s mysql --trim # Remove th
$>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 -c demo/default.yaml -i test.txt --decode # Parse the file specified by -i according to the config of -d.
$>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".
$>zd.exe -v system.ip.v1.yaml
#
View data items in build-in instances。
$>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".
$>zd.exe -v system.ip.v1.yaml View data items in build-in instances。
Service Example
Service Example
:
$zd.exe -p 80 -R d:\zd\config
#
Listen port 80. Use d:\zd\config as the root.
$zd.exe -p 80 -R d:\zd\config Listen port 80. Use d:\zd\config as the root.
Client Call
Client Call
:
$curl http://loclahost/?d=default.yaml&c=config.yaml&n=100&o=test.sql&t=user
#
Specify the server config file via GET.
$curl http://loclahost/?default=default.yaml
output=test.sql&table=user #
Parameter names can be full.
$curl -d "default=...&config=...&lines=10" http://localhost/
#
The config can be uploaded via POST.
$curl http://loclahost/?d=default.yaml&c=config.yaml&n=100&o=test.sql&t=user Specify the server config file via GET.
$curl http://loclahost/?default=default.yaml
&output=test.sql&table=user
Parameter names can be full.
$curl -d "default=...&config=...&lines=10" http://localhost/ The config can be uploaded via POST.
res/res.go
浏览文件 @
98d25c46
此差异已折叠。
点击以展开。
res/zh/sample.yaml
浏览文件 @
98d25c46
...
...
@@ -114,7 +114,7 @@ fields:
-
field
:
field_use_excel
# 从excel数据源里面取数据。
from
:
system.address.v1.china
# 从data/system/address/v1.xlsx文件中读取名为china的工作簿。
select
:
city
# 查询city字段。
where
:
state like '%山东%'
# 条件是省份包含山东。
where
:
state like '%山东%'
# 条件是省份包含山东。
postfix
:
"
\t
"
-
field
:
field_with_children
# 嵌套字段
...
...
res/zh/usage.txt
浏览文件 @
98d25c46
zend
ata是一款通用的数据生成工具,您可以使用yaml文件来定义您的数据格式,然后交由zendata生成。
ZenD
ata是一款通用的数据生成工具,您可以使用yaml文件来定义您的数据格式,然后交由zendata生成。
参数:
...
...
@@ -39,10 +39,10 @@ $>zd.exe -d demo\default.yaml -n 100 -o test.sql -t user -s mysql 输出插
$>zd.exe -i db.sql -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数据表中的数据。
$>zd.exe -v system.ip.v1.yaml
#
查看內置名为IP的Instances数据。
$>zd.exe -l 列出所有內置数据。
$>zd.exe -v system.address.v1 查看內置Excel文件system/address/v1.xlsx中的数据表。
$>zd.exe -v system.address.v1.china 查看內置Excel文件china数据表中的数据。
$>zd.exe -v system.ip.v1.yaml 查看內置名为IP的Instances数据。
服务模式举例:
...
...
@@ -51,5 +51,5 @@ $zd.exe -p 80 -R d:\zd\config 监听80端口,以d:\zd\config为根目录。
客户端调用:
$curl http://loclahost/?d=default.yaml&c=config.yaml&n=100&o=test.sql&t=user 通过GET方式指定服务器端配置文件。
$curl http://loclahost/?default=default.yaml
output=test.sql&table=user
参数名可以用全拼。
$curl http://loclahost/?default=default.yaml
&output=test.sql&table=user
参数名可以用全拼。
$curl -d "default=...&config=...&lines=10" http://localhost/ 可以通过POST方式上传配置。
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录