CREATE SHARDING KEY GENERATOR
语法用于为当前所选的逻辑库添加分布式主键生成器
CreateShardingAlgorithm ::=
'CREATE' 'SHARDING' 'KEY' 'GENERATOR' keyGeneratorName '(' algorithmDefinition ')'
algorithmDefinition ::=
'TYPE' '(' 'NAME' '=' algorithmType ( ',' 'PROPERTIES' '(' propertyDefinition ')' )?')'
propertyDefinition ::=
( key '=' value ) ( ',' key '=' value )*
keyGeneratorName ::=
identifier
algorithmType ::=
identifier
algorithmType
为分布式主键生成算法类型,详细的分布式主键生成算法类型信息请参考分布式序列算法类型。CREATE SHARDING KEY GENERATOR snowflake_key_generator (
TYPE(NAME="SNOWFLAKE", PROPERTIES("max-vibration-offset"="3"))
);
CREATE
、SHARDING
、KEY
、GENERATOR
、TYPE
、NAME
、PROPERTIES