SQL-parser

Background

The SQL parser YAML configuration is readable and easy to use. The YAML files allow you to separate the code from the configuration, and easily modify the configuration file as needed.

Parameters

  1. rules:
  2. - !SQL_PARSER
  3. sqlCommentParseEnabled: # Whether to parse SQL comments
  4. sqlStatementCache: # SQL statement local cache
  5. initialCapacity: # Initial capacity of local cache
  6. maximumSize: # Maximum capacity of local cache
  7. parseTreeCache: # Parse tree local cache
  8. initialCapacity: # Initial capacity of local cache
  9. maximumSize: # Maximum capacity of local cache

Procedure

  1. Set local cache configuration.
  2. Set parser configuration.
  3. Use a parsing engine to parse SQL.

Sample

  1. rules:
  2. - !SQL_PARSER
  3. sqlCommentParseEnabled: true
  4. sqlStatementCache:
  5. initialCapacity: 2000
  6. maximumSize: 65535
  7. parseTreeCache:
  8. initialCapacity: 128
  9. maximumSize: 1024