The CREATE SHARDING KEY GENERATOR
syntax is used to add a distributed primary key generator for the currently selected
logic database
CreateShardingAlgorithm ::=
'CREATE' 'SHARDING' 'KEY' 'GENERATOR' keyGeneratorName '(' algorithmDefinition ')'
algorithmDefinition ::=
'TYPE' '(' 'NAME' '=' algorithmType ( ',' 'PROPERTIES' '(' propertyDefinition ')' )?')'
propertyDefinition ::=
( key '=' value ) ( ',' key '=' value )*
keyGeneratorName ::=
identifier
algorithmType ::=
identifier
algorithmType
is the key generate algorithm type. For detailed key generate algorithm type information, please refer
to KEY GENERATE ALGORITHM.CREATE SHARDING KEY GENERATOR snowflake_key_generator (
TYPE(NAME="SNOWFLAKE", PROPERTIES("max-vibration-offset"="3"))
);
CREATE
, SHARDING
, KEY
, GENERATOR
, TYPE
, NAME
, PROPERTIES