常量

    • INT_VALUE:匹配整数类型常量,如123

    • DECIMAL_VALUE:匹配定点类型常量,如123.456

    • STR_VALUE:匹配字符串常量,如abc

    • NULL:匹配NULL常量。

    • STORAGE_SIZE:匹配存储长度常量,整数形式默认单位为字节,字符串形式可指定单位为M或G,如1024'500M'

    1. const_value:
    2. INT_VALUE
    3. | DECIMAL_VALUE
    4. | STR_VALUE
    5. | NULL
    6. | STORAGE_SIZE
    7. STORAGE_SIZE:
    8. INT_VALUE
    9. | 'INT_VALUE[M|G]'

    字符集

    1. charset:
    2. default_charset
    3. | column_charset
    4. default_charset:
    5. [DEFAULT] {CHARSET | CHARACTER SET} [=] {UTF8 | UTF8MB4 | BINARY}
    6. column_charset:
    7. {CHARSET | CHARACTER SET} {UTF8 | UTF8MB4 | BINARY}

    排序规则

    1. collate:
    2. default_collate
    3. | column_collate
    4. default_collate:
    5. [DEFAULT] COLLATE [=] {UTF8MB4_GENERAL_CI | UTF8MB4_BIN | BINARY}
    6. column_collate:
    7. COLLATE {UTF8MB4_GENERAL_CI | UTF8MB4_BIN | BINARY}

    数据类型

    1. data_type:
    2. TINYINT[(precision)] [UNSIGNED] [ZEROFILL]
    3. | SMALLINT[(precision)] [UNSIGNED] [ZEROFILL]
    4. | MEDIUMINT[(precision)] [UNSIGNED] [ZEROFILL]
    5. | INT[(precision)] [UNSIGNED] [ZEROFILL]
    6. | INTEGER[(precision)] [UNSIGNED] [ZEROFILL]
    7. | BIGINT[(precision)] [UNSIGNED] [ZEROFILL]
    8. | FLOAT[(precision, scale)] [UNSIGNED] [ZEROFILL]
    9. | DOUBLE[(precision, scale)] [UNSIGNED] [ZEROFILL]
    10. | DECIMAL[(precision [, scale])] [UNSIGNED] [ZEROFILL]
    11. | NUMERIC[(precision [, scale])] [UNSIGNED] [ZEROFILL]
    12. | DATETIME[(scale)]
    13. | TIMESTAMP[(scale)]
    14. | DATE
    15. | TIME[(scale)]
    16. | YEAR
    17. | VARCHAR(length) column_charset column_collate
    18. | VARBINARY(length)
    19. | CHAR[(length)] column_charset column_collate
    20. | BINARY[(length)]
    21. | TINYTEXT column_charset column_collate
    22. | TINYLOB
    23. | TEXT[(length)] column_charset column_collate
    24. | BLOB[(length)]
    25. | MEDIUMTEXT column_charset column_collate
    26. | MEDIUMBLOB
    27. | LONGTEXT column_charset column_collate
    28. | LONGBLOB
    29. precision | scale | length:
    30. INT_VALUE

    SQL属性

    • 对象名
    1. tenant_name | pool_name | unit_name | zone_name | region_name:
    2. STR_VALUE
    3. database_name | table_name | table_alias_name | column_name| column_alias_name | partition_name | subpartition_name:
    4. STR_VALUE
    5. index_name | view_name | object_name | constraint_name | tablegroup_name:
    6. STR_VALUE
    7. outline_name | user_name:
    8. STR_VALUE
    9. table_factor:
    10. [[database_name].] table_name
    11. column_factor:
    12. [table_factor.] column_name
    • 表达式
    1. expression:
    2. const_value
    3. | column_factor
    4. | operator_expression
    5. | function_expression
    • 注释
    1. comment:
    2. COMMENT 'comment_text'
    3. comment_text:
    4. STR_VALUE

    分布式属性

    • PRIMARY_ZONE:指定数据的主副本分布策略。
    1. primary_zone:
    2. PRIMARY_ZONE [=] zone_name
    • ZONE_LIST:指定租户的资源分布策略。
    1. zone_list:
    2. ZONE_LIST [=] (zone_name [, zone_name ...])
    • REPLICA_NUM:指定数据的副本份数。
    1. replica_num:
    2. REPLICA_NUM [=] INT_VALUE
    • TABLEGROUP:指定多份数据的主副本分布策略。
    1. tablegroup:
    2. default_tablegroup
    3. | table_tablegroup
    4. default_tablegroup:
    5. DEFAULT TABLEGROUP [=] {tablegroup_name | NULL}
    6. table_tablegroup:
    7. TABLEGROUP [=] {tablegroup_name | NULL}

    存储属性

    • BLOCK_SIZE:指定对象存储的微块长度。
    1. block_size:
    2. BLOCK_SIZE [=] INT_VALUE
    • COMPRESSION:指定对象存储的压缩算法。
    1. compression:
    2. COMPRESSION [=] {NONE | LZ4_1.0 | LZ0_1.0 | SNAPPY_1.0 | ZLIB_1.0}
    • PCTFREE:指定对象存储的宏块预留百分比。
    1. pctfree:
    2. PCTFREE [=] INT_VALUE
    • TABLET_SIZE:指定并行合并时单个任务的最小分片。
    1. tablet_size:
    2. TABLET_SIZE [=] INT_VALUE