RaigorJiang commented on a change in pull request #14231:
URL: https://github.com/apache/shardingsphere/pull/14231#discussion_r774276336
##########
File path:
docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding.cn.md
##########
@@ -142,13 +142,25 @@ DROP SHARDING ALGORITHM t_order_hash_mod;
*Table*
```sql
+CREATE SHARDING ALGORITHM database_inline (
+TYPE(NAME=inline,PROPERTIES("algorithm-expression"="resource_${user_id % 2}"))
+),table_inline (
+TYPE(NAME=inline,PROPERTIES("algorithm-expression"="t_order_item_${order_id %
2}"))
+);
+
CREATE SHARDING TABLE RULE t_order_item (
DATANODES("resource_${0..1}.t_order_item_${0..1}"),
DATABASE_STRATEGY(TYPE=standard,SHARDING_COLUMN=user_id,SHARDING_ALGORITHM=database_inline),
TABLE_STRATEGY(TYPE=standard,SHARDING_COLUMN=order_id,SHARDING_ALGORITHM=table_inline),
GENERATED_KEY(COLUMN=another_id,TYPE(NAME=snowflake,PROPERTIES("worker-id"=123)))
);
+ALTER SHARDING ALGORITHM database_inline (
+TYPE(NAME=inline,PROPERTIES("algorithm-expression"="resource_${user_id % 4}"))
+),table_inline (
+TYPE(NAME=inline,PROPERTIES("algorithm-expression"="t_order_item_${order_id %
4}"))
+);
+
ALTER SHARDING TABLE RULE t_order_item (
DATANODES("resource_${0..3}.t_order_item${0..3}"),
DATABASE_STRATEGY(TYPE=standard,SHARDING_COLUMN=user_id,SHARDING_ALGORITHM=database_inline),
Review comment:
There is still `uuid` with props in line 168, please update it too.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]