Skip to content

Commit

Permalink
Update docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
haocao committed Dec 14, 2016
1 parent 8fa9033 commit 0b8fd82
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ try (
<rdb:table-rule logic-table="t_order" actual-tables="t_order_${0..3}" table-strategy="orderTableStrategy"/>
<rdb:table-rule logic-table="t_order_item" actual-tables="t_order_item_${0..3}" table-strategy="orderItemTableStrategy"/>
</rdb:table-rules>
<rdb:default-database-strategy sharding-columns="user_id" algorithm-expression="dbtbl_${user_id.longValue() % 2 + 1}"/>
<rdb:default-database-strategy sharding-columns="none" algorithm-class="com.dangdang.ddframe.rdb.sharding.api.strategy.database.NoneDatabaseShardingAlgorithm"/>
</rdb:sharding-rule>
</rdb:data-source>
</beans>
Expand Down
2 changes: 1 addition & 1 deletion README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ try (
<rdb:table-rule logic-table="t_order" actual-tables="t_order_${0..3}" table-strategy="orderTableStrategy"/>
<rdb:table-rule logic-table="t_order_item" actual-tables="t_order_item_${0..3}" table-strategy="orderItemTableStrategy"/>
</rdb:table-rules>
<rdb:default-database-strategy sharding-columns="user_id" algorithm-expression="dbtbl_${user_id.longValue() % 2 + 1}"/>
<rdb:default-database-strategy sharding-columns="none" algorithm-class="com.dangdang.ddframe.rdb.sharding.api.strategy.database.NoneDatabaseShardingAlgorithm"/>
</rdb:sharding-rule>
</rdb:data-source>
</beans>
Expand Down
2 changes: 1 addition & 1 deletion sharding-jdbc-doc/content/index/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ try (
<rdb:table-rule logic-table="t_order" actual-tables="t_order_${0..3}" table-strategy="orderTableStrategy"/>
<rdb:table-rule logic-table="t_order_item" actual-tables="t_order_item_${0..3}" table-strategy="orderItemTableStrategy"/>
</rdb:table-rules>
<rdb:default-database-strategy sharding-columns="user_id" algorithm-expression="dbtbl_${user_id.longValue() % 2 + 1}"/>
<rdb:default-database-strategy sharding-columns="none" algorithm-class="com.dangdang.ddframe.rdb.sharding.api.strategy.database.NoneDatabaseShardingAlgorithm"/>
</rdb:sharding-rule>
</rdb:data-source>
</beans>
Expand Down
10 changes: 3 additions & 7 deletions sharding-jdbc-doc/content/post/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,8 @@ bindingTables:
- tableNames: ...

defaultDatabaseStrategy:
shardingColumns: user_id
algorithmExpression: ds_${user_id.longValue() % 2}

defaultTableStrategy:
shardingColumns: id, order_id
algorithmClassName: com.dangdang.ddframe.rdb.sharding.config.yaml.algorithm.MultiAlgorithm
shardingColumns: none
algorithmClassName: com.dangdang.ddframe.rdb.sharding.api.strategy.database.NoneDatabaseShardingAlgorithm

props:
metrics.enable: false
Expand Down Expand Up @@ -181,7 +177,7 @@ props: 属性配置(可选)
<rdb:binding-table-rules>
<rdb:binding-table-rule logic-tables="t_order, t_order_item"/>
</rdb:binding-table-rules>
<rdb:default-database-strategy sharding-columns="user_id" algorithm-expression="dbtbl_${id.longValue() % 2 + 1}"/>
<rdb:default-database-strategy sharding-columns="none" algorithm-class="com.dangdang.ddframe.rdb.sharding.api.strategy.database.NoneDatabaseShardingAlgorithm"/>
</rdb:sharding-rule>
<rdb:props>
<prop key="metrics.enable">true</prop>
Expand Down

0 comments on commit 0b8fd82

Please sign in to comment.