blob: 5af626ac24ae58e1bdbfbeb9e78b26f39db4e823 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Rule Definition on ShardingSphere</title>
<link>https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/</link>
<description>Recent content in Rule Definition on ShardingSphere</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<atom:link href="https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Sharding</title>
<link>https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/</guid>
<description>Syntax Sharding Table Rule CREATE SHARDING TABLE RULE shardingTableRuleDefinition [, shardingTableRuleDefinition] ... ALTER SHARDING TABLE RULE shardingTableRuleDefinition [, shardingTableRuleDefinition] ... DROP SHARDING TABLE RULE tableName [, tableName] ... CREATE DEFAULT SHARDING shardingScope STRATEGY (shardingStrategy) ALTER DEFAULT SHARDING shardingScope STRATEGY (shardingStrategy) DROP DEFAULT SHARDING shardingScope STRATEGY; CREATE SHARDING ALGORITHM shardingAlgorithmDefinition [, shardingAlgorithmDefinition] ... ALTER SHARDING ALGORITHM shardingAlgorithmDefinition [, shardingAlgorithmDefinition] ... DROP SHARDING ALGORITHM algorithmName [, algorithmName] ... CREATE SHARDING KEY GENERATOR keyGeneratorDefinition [, keyGeneratorDefinition] .</description>
</item>
<item>
<title>Single Table</title>
<link>https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/single-table/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/single-table/</guid>
<description>Definition CREATE DEFAULT SINGLE TABLE RULE singleTableRuleDefinition ALTER DEFAULT SINGLE TABLE RULE singleTableRuleDefinition DROP DEFAULT SINGLE TABLE RULE singleTableRuleDefinition: RESOURCE = resourceName RESOURCE needs to use data source resource managed by RDL Example Single Table Rule CREATE DEFAULT SINGLE TABLE RULE RESOURCE = ds_0 ALTER DEFAULT SINGLE TABLE RULE RESOURCE = ds_1 DROP DEFAULT SINGLE TABLE RULE </description>
</item>
<item>
<title>Readwrite-Splitting</title>
<link>https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/readwrite-splitting/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/readwrite-splitting/</guid>
<description>Syntax CREATE READWRITE_SPLITTING RULE readwriteSplittingRuleDefinition [, readwriteSplittingRuleDefinition] ... ALTER READWRITE_SPLITTING RULE readwriteSplittingRuleDefinition [, readwriteSplittingRuleDefinition] ... DROP READWRITE_SPLITTING RULE ruleName [, ruleName] ... readwriteSplittingRuleDefinition: ruleName ([staticReadwriteSplittingRuleDefinition | dynamicReadwriteSplittingRuleDefinition] [, loadBanlancerDefinition]) staticReadwriteSplittingRuleDefinition: WRITE_RESOURCE=writeResourceName, READ_RESOURCES(resourceName [, resourceName] ... ) dynamicReadwriteSplittingRuleDefinition: AUTO_AWARE_RESOURCE=resourceName [, WRITE_DATA_SOURCE_QUERY_ENABLED=writeDataSourceQueryEnabled] loadBanlancerDefinition: TYPE(NAME=loadBanlancerType [, PROPERTIES([algorithmProperties] )] ) algorithmProperties: algorithmProperty [, algorithmProperty] ... algorithmProperty: key=value writeDataSourceQueryEnabled: TRUE | FALSE Support the creation of static readwrite-splitting rules and dynamic readwrite-splitting rules Dynamic readwrite-splitting rules rely on database discovery rules loadBanlancerType specifies the load balancing algorithm type, please refer to Load Balance Algorithm Duplicate ruleName will not be created Example // Static CREATE READWRITE_SPLITTING RULE ms_group_0 ( WRITE_RESOURCE=write_ds, READ_RESOURCES(read_ds_0,read_ds_1), TYPE(NAME=random) ); // Dynamic CREATE READWRITE_SPLITTING RULE ms_group_1 ( AUTO_AWARE_RESOURCE=group_0, WRITE_DATA_SOURCE_QUERY_ENABLED=false, TYPE(NAME=random,PROPERTIES(read_weight=&amp;#39;2:1&amp;#39;)) ); ALTER READWRITE_SPLITTING RULE ms_group_1 ( WRITE_RESOURCE=write_ds, READ_RESOURCES(read_ds_0,read_ds_1,read_ds_2), TYPE(NAME=random,PROPERTIES(read_weight=&amp;#39;2:0&amp;#39;)) ); DROP READWRITE_SPLITTING RULE ms_group_1; </description>
</item>
<item>
<title>DB Discovery</title>
<link>https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/db-discovery/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/db-discovery/</guid>
<description>Syntax CREATE DB_DISCOVERY RULE ruleDefinition [, ruleDefinition] ... ALTER DB_DISCOVERY RULE ruleDefinition [, ruleDefinition] ... DROP DB_DISCOVERY RULE ruleName [, ruleName] ... CREATE DB_DISCOVERY TYPE databaseDiscoveryTypeDefinition [, databaseDiscoveryTypeDefinition] ... ALTER DB_DISCOVERY TYPE databaseDiscoveryTypeDefinition [, databaseDiscoveryTypeDefinition] ... DROP DB_DISCOVERY TYPE discoveryTypeName [, discoveryTypeName] ... CREATE DB_DISCOVERY HEARTBEAT databaseDiscoveryHeartbaetDefinition [, databaseDiscoveryHeartbaetDefinition] ... ALTER DB_DISCOVERY HEARTBEAT databaseDiscoveryHeartbaetDefinition [, databaseDiscoveryHeartbaetDefinition] ... DROP DB_DISCOVERY HEARTBEAT discoveryHeartbeatName [, discoveryHeartbeatName] ... ruleDefinition: (databaseDiscoveryRuleDefinition | databaseDiscoveryRuleConstruction) databaseDiscoveryRuleDefinition ruleName (resources, typeDefinition, heartbeatDefinition) databaseDiscoveryRuleConstruction ruleName (resources, TYPE = discoveryTypeName, HEARTBEAT = discoveryHeartbeatName) databaseDiscoveryTypeDefinition discoveryTypeName (typeDefinition) databaseDiscoveryHeartbaetDefinition discoveryHeartbeatName (PROPERTIES (properties)) resources: RESOURCES(resourceName [, resourceName] .</description>
</item>
<item>
<title>Encrypt</title>
<link>https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/</guid>
<description>Syntax CREATE ENCRYPT RULE encryptRuleDefinition [, encryptRuleDefinition] ... ALTER ENCRYPT RULE encryptRuleDefinition [, encryptRuleDefinition] ... DROP ENCRYPT RULE tableName [, tableName] ... encryptRuleDefinition: tableName(COLUMNS(columnDefinition [, columnDefinition] ...), QUERY_WITH_CIPHER_COLUMN=queryWithCipherColumn) columnDefinition: (NAME=columnName [, PLAIN=plainColumnName] , CIPHER=cipherColumnName, encryptAlgorithm) encryptAlgorithm: TYPE(NAME=encryptAlgorithmType [, PROPERTIES([algorithmProperties] )] ) algorithmProperties: algorithmProperty [, algorithmProperty] ... algorithmProperty: key=value PLAIN specifies the plain column, CIPHER specifies the cipher column encryptAlgorithmType specifies the encryption algorithm type, please refer to Encryption Algorithm Duplicate tableName will not be created queryWithCipherColumn support uppercase or lowercase true or false Example CREATE ENCRYPT RULE t_encrypt ( COLUMNS( (NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,TYPE(NAME=AES,PROPERTIES(&amp;#39;aes-key-value&amp;#39;=&amp;#39;123456abc&amp;#39;))), (NAME=order_id, CIPHER =order_cipher,TYPE(NAME=MD5)) ), QUERY_WITH_CIPHER_COLUMN=true), t_encrypt_2 ( COLUMNS( (NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,TYPE(NAME=AES,PROPERTIES(&amp;#39;aes-key-value&amp;#39;=&amp;#39;123456abc&amp;#39;))), (NAME=order_id, CIPHER=order_cipher,TYPE(NAME=MD5)) ), QUERY_WITH_CIPHER_COLUMN=FALSE); ALTER ENCRYPT RULE t_encrypt ( COLUMNS( (NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,TYPE(NAME=AES,PROPERTIES(&amp;#39;aes-key-value&amp;#39;=&amp;#39;123456abc&amp;#39;))), (NAME=order_id,CIPHER=order_cipher,TYPE(NAME=MD5)) ), QUERY_WITH_CIPHER_COLUMN=TRUE); DROP ENCRYPT RULE t_encrypt,t_encrypt_2; </description>
</item>
<item>
<title>Shadow</title>
<link>https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/</guid>
<description>Syntax CREATE SHADOW RULE shadowRuleDefinition [, shadowRuleDefinition] ... ALTER SHADOW RULE shadowRuleDefinition [, shadowRuleDefinition] ... CREATE SHADOW ALGORITHM shadowAlgorithm [, shadowAlgorithm] ... ALTER SHADOW ALGORITHM shadowAlgorithm [, shadowAlgorithm] ... DROP SHADOW RULE ruleName [, ruleName] ... DROP SHADOW ALGORITHM algorithmName [, algorithmName] ... CREATE DEFAULT SHADOW ALGORITHM NAME = algorithmName shadowRuleDefinition: ruleName(resourceMapping, shadowTableRule [, shadowTableRule] ...) resourceMapping: SOURCE=resourceName, SHADOW=resourceName shadowTableRule: tableName(shadowAlgorithm [, shadowAlgorithm] ...) shadowAlgorithm: ([algorithmName, ] TYPE(NAME=shadowAlgorithmType, PROPERTIES([algorithmProperties] ...))) algorithmProperties: algorithmProperty [, algorithmProperty] .</description>
</item>
</channel>
</rss>