Alter SQL_PARSER Rule

Description

The ALTER SQL_PARSER RULE syntax is used to alter the SQL parser rule configuration.

Syntax

Grammar Railroad diagram

  1. AlterSqlParserRule ::=
  2. 'ALTER' 'SQL_PARSER' 'RULE' '(' sqlParserRuleDefinition ')'
  3. sqlParserRuleDefinition ::=
  4. commentDefinition? (',' parseTreeCacheDefinition)? (',' sqlStatementCacheDefinition)?
  5. commentDefinition ::=
  6. 'SQL_COMMENT_PARSE_ENABLED' '=' sqlCommentParseEnabled
  7. parseTreeCacheDefinition ::=
  8. 'PARSE_TREE_CACHE' '(' cacheOption ')'
  9. sqlStatementCacheDefinition ::=
  10. 'SQL_STATEMENT_CACHE' '(' cacheOption ')'
  11. sqlCommentParseEnabled ::=
  12. boolean
  13. cacheOption ::=
  14. ('INITIAL_CAPACITY' '=' initialCapacity)? (','? 'MAXIMUM_SIZE' '=' maximumSize)?
  15. initialCapacity ::=
  16. int
  17. maximumSize ::=
  18. int

Note

  • SQL_COMMENT_PARSE_ENABLE: specifies whether to parse the SQL comment.

  • PARSE_TREE_CACHE: local cache configuration of the syntax tree.

  • SQL_STATEMENT_CACHE: the local cache of SQL statement.

Example

  • Alter SQL parser rule
  1. ALTER SQL_PARSER RULE (
  2. SQL_COMMENT_PARSE_ENABLED=false,
  3. PARSE_TREE_CACHE(INITIAL_CAPACITY=128, MAXIMUM_SIZE=1024),
  4. SQL_STATEMENT_CACHE(INITIAL_CAPACITY=2000, MAXIMUM_SIZE=65535)
  5. );

Reserved word

ALTER, SQL_PARSER, RULE, SQL_COMMENT_PARSE_ENABLED, PARSE_TREE_CACHE, INITIAL_CAPACITY, MAXIMUM_SIZE, SQL_STATEMENT_CACHE