CREATE DEFAULT SHADOW ALGORITHM

Description

The CREATE DEFAULT SHADOW ALGORITHM syntax is used to create a default shadow algorithm.

Syntax

Grammar Railroad diagram

  1. CreateDefaultShadowAlgorithm ::=
  2. 'CREATE' 'DEFAULT' 'SHADOW' 'ALGORITHM' ifNotExists? shadowAlgorithm
  3. ifNotExists ::=
  4. 'IF' 'NOT' 'EXISTS'
  5. shadowAlgorithm ::=
  6. 'TYPE' '(' 'NAME' '=' shadowAlgorithmType ',' propertiesDefiinition ')'
  7. shadowAlgorithmType ::=
  8. string
  9. propertiesDefinition ::=
  10. 'PROPERTIES' '(' key '=' value (',' key '=' value)* ')'
  11. key ::=
  12. string
  13. value ::=
  14. literal

Supplement

  • shadowAlgorithmType currently supports VALUE_MATCH, REGEX_MATCH and SQL_HINT;
  • ifNotExists clause is used for avoid Duplicate default shadow algorithm error.

Example

  • Create default shadow algorithm
  1. CREATE DEFAULT SHADOW ALGORITHM TYPE(NAME="SQL_HINT");
  • Create default shadow algorithm with ifNotExist clause
  1. CREATE DEFAULT SHADOW ALGORITHM IF NOT EXISTS TYPE(NAME="SQL_HINT");

Reserved word

CREATE, DEFAULT, SHADOW, ALGORITHM, TYPE, NAME, PROPERTIES