Skip to content

Commit

Permalink
1. for xml format & checkstyle
Browse files Browse the repository at this point in the history
2. keyGeneratorClass => keyGeneratorClassName
  • Loading branch information
terrymanu committed May 3, 2018
1 parent 400552d commit e223cd9
Show file tree
Hide file tree
Showing 144 changed files with 569 additions and 779 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<asserts sharding-rule-config="./config/test" init-data-file="./init" database="h2,mysql,oracle,sqlserver,postgresql">
<assertDDL id="assertAlterTable" init-sql="createTLog" clean-sql="dropTLog" expected-update="1" sql="assertAlterTable"
table="t_log"
expected-data-file="t_order_update.xml">
<assertDDL id="assertAlterTable" init-sql="createTLog" clean-sql="dropTLog" expected-update="1" sql="assertAlterTable" table="t_log" expected-data-file="t_order_update.xml">
</assertDDL>
<assertDDL id="assertAlterTableIfExistAndOnly" init-sql="createTLog" clean-sql="dropTLog" expected-update="1" sql="assertAlterTable"
table="t_log"
expected-data-file="t_order_update.xml">
</assertDDL>
</asserts>
</asserts>
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
<cloumn name="name" type="varchar"/>
</table>
</metadata>
</init>
</init>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
shardingRule:
defaultDataSourceName: db_0

defaultKeyGeneratorClass: io.shardingjdbc.dbtest.core.yaml.fixture.IncrementKeyGenerator
defaultKeyGeneratorClassName: io.shardingjdbc.dbtest.core.yaml.fixture.IncrementKeyGenerator

tables:

Expand All @@ -19,8 +19,7 @@ shardingRule:
t_order_item:
actualDataNodes: db_${0..9}.t_order_item
keyGeneratorColumnName: order_item_id
keyGeneratorClass: io.shardingjdbc.dbtest.core.yaml.fixture.DecrementKeyGenerator
#绑定表中其余的表的策略与第一张表的策略相同
keyGeneratorClassName: io.shardingjdbc.dbtest.core.yaml.fixture.DecrementKeyGenerator
databaseStrategy:
standard:
shardingColumn: user_id
Expand All @@ -33,7 +32,6 @@ shardingRule:
bindingTables:
- t_order,t_order_item

#默认数据库分片策略
defaultDatabaseStrategy:
complex:
shardingColumns: order_id, user_id
Expand All @@ -43,4 +41,4 @@ shardingRule:
shardingColumns: id, order_id
algorithmClassName: io.shardingjdbc.dbtest.core.yaml.fixture.MultiAlgorithm
props:
sql.show: true
sql.show: true
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
shardingRule:
defaultDataSourceName: dbtbl_0

defaultKeyGeneratorClass: io.shardingjdbc.dbtest.core.yaml.fixture.IncrementKeyGenerator
defaultKeyGeneratorClassName: io.shardingjdbc.dbtest.core.yaml.fixture.IncrementKeyGenerator

tables:

Expand All @@ -19,8 +19,7 @@ shardingRule:
t_order_item:
actualDataNodes: dbtbl_${0..9}.t_order_item_${0..9}
keyGeneratorColumnName: order_item_id
keyGeneratorClass: io.shardingjdbc.dbtest.core.yaml.fixture.DecrementKeyGenerator
#绑定表中其余的表的策略与第一张表的策略相同
keyGeneratorClassName: io.shardingjdbc.dbtest.core.yaml.fixture.DecrementKeyGenerator
databaseStrategy:
standard:
shardingColumn: user_id
Expand All @@ -33,7 +32,6 @@ shardingRule:
bindingTables:
- t_order,t_order_item

#默认数据库分片策略
defaultDatabaseStrategy:
complex:
shardingColumns: order_id, user_id
Expand All @@ -43,4 +41,4 @@ shardingRule:
shardingColumns: order_id
algorithmClassName: io.shardingjdbc.dbtest.core.yaml.fixture.MultiAlgorithm
props:
sql.show: true
sql.show: true
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,17 @@
shardingRule:
defaultDataSourceName: nullable_0

defaultKeyGeneratorClass: io.shardingjdbc.dbtest.core.yaml.fixture.IncrementKeyGenerator
defaultKeyGeneratorClassName: io.shardingjdbc.dbtest.core.yaml.fixture.IncrementKeyGenerator

tables:

t_order:
actualDataNodes: nullable_${0..9}.t_order
databaseStrategy:
standard:
shardingColumn: user_id
preciseAlgorithmClassName: io.shardingjdbc.dbtest.core.yaml.fixture.SingleAlgorithm


bindingTables:
- t_order

props:
sql.show: true
sql.show: true
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<t_order order_id="1001" user_id="10" status="init"/>
<t_order order_id="2000" user_id="20" status="init"/>
<t_order order_id="2001" user_id="20" status="init"/>

<t_order_item item_id="100001" order_id="1000" user_id="10" status="init"/>
<t_order_item item_id="100002" order_id="1000" user_id="10" status="init"/>
<t_order_item item_id="100101" order_id="1001" user_id="10" status="init"/>
Expand All @@ -14,4 +13,4 @@
<t_order_item item_id="200101" order_id="2001" user_id="20" status="init"/>
<t_order_item item_id="200102" order_id="2001" user_id="20" status="init"/>
</dataset>
</init>
</init>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<t_order order_id="1101" user_id="11" status="init"/>
<t_order order_id="2100" user_id="21" status="init"/>
<t_order order_id="2101" user_id="21" status="init"/>

<t_order_item item_id="110001" order_id="1100" user_id="11" status="init"/>
<t_order_item item_id="110002" order_id="1100" user_id="11" status="init"/>
<t_order_item item_id="110101" order_id="1101" user_id="11" status="init"/>
Expand All @@ -14,4 +13,4 @@
<t_order_item item_id="210101" order_id="2101" user_id="21" status="init"/>
<t_order_item item_id="210102" order_id="2101" user_id="21" status="init"/>
</dataset>
</init>
</init>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<t_order order_id="1201" user_id="12" status="init"/>
<t_order order_id="2200" user_id="22" status="init"/>
<t_order order_id="2201" user_id="22" status="init"/>

<t_order_item item_id="120001" order_id="1200" user_id="12" status="init"/>
<t_order_item item_id="120002" order_id="1200" user_id="12" status="init"/>
<t_order_item item_id="120101" order_id="1201" user_id="12" status="init"/>
Expand All @@ -14,4 +13,4 @@
<t_order_item item_id="220101" order_id="2201" user_id="22" status="init"/>
<t_order_item item_id="220102" order_id="2201" user_id="22" status="init"/>
</dataset>
</init>
</init>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<t_order order_id="1301" user_id="13" status="init"/>
<t_order order_id="2300" user_id="23" status="init"/>
<t_order order_id="2301" user_id="23" status="init"/>

<t_order_item item_id="130001" order_id="1300" user_id="13" status="init"/>
<t_order_item item_id="130002" order_id="1300" user_id="13" status="init"/>
<t_order_item item_id="130101" order_id="1301" user_id="13" status="init"/>
Expand All @@ -14,4 +13,4 @@
<t_order_item item_id="230101" order_id="2301" user_id="23" status="init"/>
<t_order_item item_id="230102" order_id="2301" user_id="23" status="init"/>
</dataset>
</init>
</init>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<t_order order_id="1401" user_id="14" status="init"/>
<t_order order_id="2400" user_id="24" status="init"/>
<t_order order_id="2401" user_id="24" status="init"/>

<t_order_item item_id="140001" order_id="1400" user_id="14" status="init"/>
<t_order_item item_id="140002" order_id="1400" user_id="14" status="init"/>
<t_order_item item_id="140101" order_id="1401" user_id="14" status="init"/>
Expand All @@ -14,4 +13,4 @@
<t_order_item item_id="240101" order_id="2401" user_id="24" status="init"/>
<t_order_item item_id="240102" order_id="2401" user_id="24" status="init"/>
</dataset>
</init>
</init>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<t_order order_id="1501" user_id="15" status="init"/>
<t_order order_id="2500" user_id="25" status="init"/>
<t_order order_id="2501" user_id="25" status="init"/>

<t_order_item item_id="150001" order_id="1500" user_id="15" status="init"/>
<t_order_item item_id="150002" order_id="1500" user_id="15" status="init"/>
<t_order_item item_id="150101" order_id="1501" user_id="15" status="init"/>
Expand All @@ -14,4 +13,4 @@
<t_order_item item_id="250101" order_id="2501" user_id="25" status="init"/>
<t_order_item item_id="250102" order_id="2501" user_id="25" status="init"/>
</dataset>
</init>
</init>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<t_order order_id="1601" user_id="16" status="init"/>
<t_order order_id="2600" user_id="26" status="init"/>
<t_order order_id="2601" user_id="26" status="init"/>

<t_order_item item_id="160001" order_id="1600" user_id="16" status="init"/>
<t_order_item item_id="160002" order_id="1600" user_id="16" status="init"/>
<t_order_item item_id="160101" order_id="1601" user_id="16" status="init"/>
Expand All @@ -14,4 +13,4 @@
<t_order_item item_id="260101" order_id="2601" user_id="26" status="init"/>
<t_order_item item_id="260102" order_id="2601" user_id="26" status="init"/>
</dataset>
</init>
</init>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<t_order order_id="1701" user_id="17" status="init"/>
<t_order order_id="2700" user_id="27" status="init"/>
<t_order order_id="2701" user_id="27" status="init"/>

<t_order_item item_id="170001" order_id="1700" user_id="17" status="init"/>
<t_order_item item_id="170002" order_id="1700" user_id="17" status="init"/>
<t_order_item item_id="170101" order_id="1701" user_id="17" status="init"/>
Expand All @@ -14,4 +13,4 @@
<t_order_item item_id="270101" order_id="2701" user_id="27" status="init"/>
<t_order_item item_id="270102" order_id="2701" user_id="27" status="init"/>
</dataset>
</init>
</init>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<t_order order_id="1801" user_id="18" status="init"/>
<t_order order_id="2800" user_id="28" status="init"/>
<t_order order_id="2801" user_id="28" status="init"/>

<t_order_item item_id="180001" order_id="1800" user_id="18" status="init"/>
<t_order_item item_id="180002" order_id="1800" user_id="18" status="init"/>
<t_order_item item_id="180101" order_id="1801" user_id="18" status="init"/>
Expand All @@ -14,4 +13,4 @@
<t_order_item item_id="280101" order_id="2801" user_id="28" status="init"/>
<t_order_item item_id="280102" order_id="2801" user_id="28" status="init"/>
</dataset>
</init>
</init>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<t_order order_id="1901" user_id="19" status="init"/>
<t_order order_id="2900" user_id="29" status="init"/>
<t_order order_id="2901" user_id="29" status="init"/>

<t_order_item item_id="190001" order_id="1900" user_id="19" status="init"/>
<t_order_item item_id="190002" order_id="1900" user_id="19" status="init"/>
<t_order_item item_id="190101" order_id="1901" user_id="19" status="init"/>
Expand All @@ -14,4 +13,4 @@
<t_order_item item_id="290101" order_id="2901" user_id="29" status="init"/>
<t_order_item item_id="290102" order_id="2901" user_id="29" status="init"/>
</dataset>
</init>
</init>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<t_order_7 order_id="1007" user_id="10" status="init"/>
<t_order_8 order_id="1008" user_id="10" status="init"/>
<t_order_9 order_id="1009" user_id="10" status="init"/>

<t_order_item_0 item_id="100000" order_id="1000" user_id="10" status="init"/>
<t_order_item_0 item_id="100001" order_id="1000" user_id="10" status="init"/>
<t_order_item_1 item_id="100100" order_id="1001" user_id="10" status="init"/>
Expand All @@ -31,9 +30,7 @@
<t_order_item_8 item_id="100801" order_id="1008" user_id="10" status="init"/>
<t_order_item_9 item_id="100900" order_id="1009" user_id="10" status="init"/>
<t_order_item_9 item_id="100901" order_id="1009" user_id="10" status="init"/>

<t_config id="1" status="init"/>

<t_global id="1" status="global"/>
</dataset>
</init>
</init>
Original file line number Diff line number Diff line change
@@ -1,37 +1,35 @@
<init>
<dataset>
<t_order_0 order_id="1100" user_id="11" status="init" />
<t_order_1 order_id="1101" user_id="11" status="init" />
<t_order_2 order_id="1102" user_id="11" status="init" />
<t_order_3 order_id="1103" user_id="11" status="init" />
<t_order_4 order_id="1104" user_id="11" status="init" />
<t_order_5 order_id="1105" user_id="11" status="init" />
<t_order_6 order_id="1106" user_id="11" status="init" />
<t_order_7 order_id="1107" user_id="11" status="init" />
<t_order_8 order_id="1108" user_id="11" status="init" />
<t_order_9 order_id="1109" user_id="11" status="init" />

<t_order_item_0 item_id="110000" order_id="1100" user_id="11" status="init" />
<t_order_item_0 item_id="110001" order_id="1100" user_id="11" status="init" />
<t_order_item_1 item_id="110100" order_id="1101" user_id="11" status="init" />
<t_order_item_1 item_id="110101" order_id="1101" user_id="11" status="init" />
<t_order_item_2 item_id="110200" order_id="1102" user_id="11" status="init" />
<t_order_item_2 item_id="110201" order_id="1102" user_id="11" status="init" />
<t_order_item_3 item_id="110300" order_id="1103" user_id="11" status="init" />
<t_order_item_3 item_id="110301" order_id="1103" user_id="11" status="init" />
<t_order_item_4 item_id="110400" order_id="1104" user_id="11" status="init" />
<t_order_item_4 item_id="110401" order_id="1104" user_id="11" status="init" />
<t_order_item_5 item_id="110500" order_id="1105" user_id="11" status="init" />
<t_order_item_5 item_id="110501" order_id="1105" user_id="11" status="init" />
<t_order_item_6 item_id="110600" order_id="1106" user_id="11" status="init" />
<t_order_item_6 item_id="110601" order_id="1106" user_id="11" status="init" />
<t_order_item_7 item_id="110700" order_id="1107" user_id="11" status="init" />
<t_order_item_7 item_id="110701" order_id="1107" user_id="11" status="init" />
<t_order_item_8 item_id="110800" order_id="1108" user_id="11" status="init" />
<t_order_item_8 item_id="110801" order_id="1108" user_id="11" status="init" />
<t_order_item_9 item_id="110900" order_id="1109" user_id="11" status="init" />
<t_order_item_9 item_id="110901" order_id="1109" user_id="11" status="init" />

<t_config id="1" status="init" />
</dataset>
</init>
<dataset>
<t_order_0 order_id="1100" user_id="11" status="init" />
<t_order_1 order_id="1101" user_id="11" status="init" />
<t_order_2 order_id="1102" user_id="11" status="init" />
<t_order_3 order_id="1103" user_id="11" status="init" />
<t_order_4 order_id="1104" user_id="11" status="init" />
<t_order_5 order_id="1105" user_id="11" status="init" />
<t_order_6 order_id="1106" user_id="11" status="init" />
<t_order_7 order_id="1107" user_id="11" status="init" />
<t_order_8 order_id="1108" user_id="11" status="init" />
<t_order_9 order_id="1109" user_id="11" status="init" />
<t_order_item_0 item_id="110000" order_id="1100" user_id="11" status="init" />
<t_order_item_0 item_id="110001" order_id="1100" user_id="11" status="init" />
<t_order_item_1 item_id="110100" order_id="1101" user_id="11" status="init" />
<t_order_item_1 item_id="110101" order_id="1101" user_id="11" status="init" />
<t_order_item_2 item_id="110200" order_id="1102" user_id="11" status="init" />
<t_order_item_2 item_id="110201" order_id="1102" user_id="11" status="init" />
<t_order_item_3 item_id="110300" order_id="1103" user_id="11" status="init" />
<t_order_item_3 item_id="110301" order_id="1103" user_id="11" status="init" />
<t_order_item_4 item_id="110400" order_id="1104" user_id="11" status="init" />
<t_order_item_4 item_id="110401" order_id="1104" user_id="11" status="init" />
<t_order_item_5 item_id="110500" order_id="1105" user_id="11" status="init" />
<t_order_item_5 item_id="110501" order_id="1105" user_id="11" status="init" />
<t_order_item_6 item_id="110600" order_id="1106" user_id="11" status="init" />
<t_order_item_6 item_id="110601" order_id="1106" user_id="11" status="init" />
<t_order_item_7 item_id="110700" order_id="1107" user_id="11" status="init" />
<t_order_item_7 item_id="110701" order_id="1107" user_id="11" status="init" />
<t_order_item_8 item_id="110800" order_id="1108" user_id="11" status="init" />
<t_order_item_8 item_id="110801" order_id="1108" user_id="11" status="init" />
<t_order_item_9 item_id="110900" order_id="1109" user_id="11" status="init" />
<t_order_item_9 item_id="110901" order_id="1109" user_id="11" status="init" />
<t_config id="1" status="init" />
</dataset>
</init>
Loading

0 comments on commit e223cd9

Please sign in to comment.