From 6edef981253bae57a5a1a90687172518a8fe241f Mon Sep 17 00:00:00 2001 From: aaron <462826@qq.com> Date: Thu, 28 May 2020 14:05:17 +0800 Subject: [PATCH] update doc --- demo/base.yaml | 14 ++++++++++++++ demo/default.yaml | 22 ---------------------- demo/inherit.yaml | 7 +++++++ demo/numb.yaml | 6 ++++-- demo/output.txt | 28 ++++++++++++++-------------- demo/test.yaml | 3 ++- res/doc/sample.txt | 23 +++++++++++++++-------- 7 files changed, 56 insertions(+), 47 deletions(-) create mode 100644 demo/base.yaml delete mode 100644 demo/default.yaml create mode 100644 demo/inherit.yaml diff --git a/demo/base.yaml b/demo/base.yaml new file mode 100644 index 0000000..cfa4401 --- /dev/null +++ b/demo/base.yaml @@ -0,0 +1,14 @@ +title: 测试 +desc: 测试文件 +author: wwccss +version: 1.0 + +fields: + - field: field1 + note: 引用同级目录中的yaml文件,取small和large两个分组的值 + from: numb.yaml + use: small,large + loop: 3 + loopfix: "|" + prefix: "[" + postfix: "]" \ No newline at end of file diff --git a/demo/default.yaml b/demo/default.yaml deleted file mode 100644 index 221e62b..0000000 --- a/demo/default.yaml +++ /dev/null @@ -1,22 +0,0 @@ -title: 测试 -desc: 测试文件 -author: wwccss -version: 1.0 - -fields: - - field: field1 - note: 测试自定义字段 - from: numb.yaml - use: small,large - - - field: field2 - note: 测试系统字段 in default - from: system.ip.v1.yaml - use: privateC,privateB - loop: 2 - - - field: field3 - note: 测试Excel数据 - from: system.address.v1.city - select: name - where: state like '%山东%' \ No newline at end of file diff --git a/demo/inherit.yaml b/demo/inherit.yaml new file mode 100644 index 0000000..4948f2c --- /dev/null +++ b/demo/inherit.yaml @@ -0,0 +1,7 @@ +title: test +desc: This is a test file. +author: zentao +version: 1.0 + +fields: + - field: field1 diff --git a/demo/numb.yaml b/demo/numb.yaml index a077885..2e786a3 100644 --- a/demo/numb.yaml +++ b/demo/numb.yaml @@ -4,9 +4,11 @@ author: wwccss version: 1.0 field: number -prefix: int_ +prefix: "'" +postfix: "'" +loop: 2 +loopfix: "-" ranges: small: 1-9 medium: 11-99 large: 10001-99999 -postfix: "," diff --git a/demo/output.txt b/demo/output.txt index 14e8217..119c06c 100644 --- a/demo/output.txt +++ b/demo/output.txt @@ -1,14 +1,14 @@ -int_1,|int_2,|int_3, -int_4,|int_5,|int_6, -int_7,|int_8,|int_9, -int_1,|int_2,|int_3, -int_4,|int_5,|int_6, -int_10001,|int_10002,|int_10003, -int_10004,|int_10005,|int_10006, -int_10007,|int_10008,|int_10009, -int_10010,|int_10011,|int_10012, -int_10013,|int_10014,|int_10015, -int_1,|int_2,|int_3, -int_4,|int_5,|int_6, -int_7,|int_8,|int_9, -int_1,|int_2,|int_3, +int_1-int_2-int_3 +int_4-int_5-int_6 +int_7-int_8-int_9 +int_1-int_2-int_3 +int_4-int_5-int_6 +int_10001-int_10002-int_10003 +int_10004-int_10005-int_10006 +int_10007-int_10008-int_10009 +int_10010-int_10011-int_10012 +int_10013-int_10014-int_10015 +int_1-int_2-int_3 +int_4-int_5-int_6 +int_7-int_8-int_9 +int_1-int_2-int_3 diff --git a/demo/test.yaml b/demo/test.yaml index c2d4e17..a39f0e3 100644 --- a/demo/test.yaml +++ b/demo/test.yaml @@ -13,7 +13,8 @@ fields: from: numb.yaml use: small,large loop: 3 - loopfix: "|" + loopfix: "-" + postfix: "," expect: 1,2,3,101,102... - field: field2 diff --git a/res/doc/sample.txt b/res/doc/sample.txt index 53f6093..9bd4e60 100644 --- a/res/doc/sample.txt +++ b/res/doc/sample.txt @@ -1,8 +1,15 @@ - $>zd.exe -s 根据系统提示,设置工具语言属性。 - $>zd.exe -h 查看使用帮助。 - $>zd.exe -y demo/test.yaml -c 15 -field field1 -o demo/output.txt -f text - 执行数据生成命令。使用配置文件demo/test.yaml,生成15行数据,以text格式的输出到demo/output.txt文件中。 - $>zd.exe -d demo/common.yaml -y demo/test.yaml -c 15 -field field1 -o demo/output.txt -f sql -t table_name - 生成SQL格式的输出,表名为table_name。使用文件demo/test.yam覆盖默认配置demo/common.yaml中的内容。 - $>zd.exe -i xdoc/test/zentao.sql -o out - 从指定的数据库Schema创建yaml定义文件,输出到out目录下。 \ No newline at end of file + $>zd.exe -s 根据系统提示,设置工具语言等属性。 + + $>zd.exe -h 查看使用帮助。 + + $>zd.exe -y demo/test.yaml -c 15 -field field1 -o demo/output.txt -f text + 执行数据生成命令。使用配置文件demo/test.yaml,生成15行数据,以text格式的输出到demo/output.txt文件中。 + + $>zd.exe -y demo/test.yaml -c 15 -field field1 -o demo/insert.sql -f sql -t table_name + 执行数据生成命令。以SQL语句形式输出到demo/insert.sql文件中,表名为table_name。 + + $>zd.exe -d demo/base.yaml -y demo/test.yaml -c 15 -field field1 -o demo/output.txt + 执行数据生成命令。使用文件demo/test.yam覆盖默认配置demo/common.yaml中的内容。 + + $>zd.exe -i xdoc/test/zentao.sql -o out + 从指定的数据库Schema,创建yaml定义文件,输出到out目录下。 \ No newline at end of file -- GitLab