blob: 68162c1fd4e3cb7dc40a60793cb48da449f7de62 [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>规则定义 on ShardingSphere</title>
<link>https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/</link>
<description>Recent content in 规则定义 on ShardingSphere</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<atom:link href="https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>数据分片</title>
<link>https://shardingsphere.apache.org/document/current/cn/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/cn/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/</guid>
<description>语法说明 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>单表</title>
<link>https://shardingsphere.apache.org/document/current/cn/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/cn/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/single-table/</guid>
<description>定义 CREATE DEFAULT SINGLE TABLE RULE singleTableRuleDefinition ALTER DEFAULT SINGLE TABLE RULE singleTableRuleDefinition DROP DEFAULT SINGLE TABLE RULE singleTableRuleDefinition: RESOURCE = resourceName RESOURCE 需使用 RDL 管理的数据源资源。 示例 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>读写分离</title>
<link>https://shardingsphere.apache.org/document/current/cn/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/cn/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/readwrite-splitting/</guid>
<description>语法说明 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 支持创建静态读写分离规则和动态读写分离规则; 动态读写分离规则依赖于数据库发现规则; loadBanlancerType 指定负载均衡算法类型,请参考 负载均衡算法; 重复的 ruleName 将无法被创建。 示例 // 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>数据库发现</title>
<link>https://shardingsphere.apache.org/document/current/cn/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/cn/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/db-discovery/</guid>
<description>语法说明 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>数据加密</title>
<link>https://shardingsphere.apache.org/document/current/cn/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/cn/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/</guid>
<description>语法说明 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 指定明文数据列,CIPHER 指定密文数据列; encryptAlgorithmType 指定加密算法类型,请参考 加密算法; 重复的 tableName 将无法被创建; queryWithCipherColumn 支持大写或小写的 true 或 false。 示例 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>影子库压测</title>
<link>https://shardingsphere.apache.org/document/current/cn/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/cn/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/shadow/</guid>
<description>语法说明 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>