Enum Lex

java.lang.Object
java.lang.Enum<Lex>
org.apache.calcite.config.Lex
All Implemented Interfaces:
Serializable, Comparable<Lex>, Constable

public enum Lex extends Enum<Lex>
Named, built-in lexical policy. A lexical policy describes how identifiers are quoted, whether they are converted to upper- or lower-case when they are read, and whether they are matched case-sensitively.
  • Enum Constant Details

    • BIG_QUERY

      public static final Lex BIG_QUERY
      Lexical policy similar to BigQuery. The case of identifiers is preserved whether or not they quoted; after which, identifiers are matched case-insensitively. Back-ticks allow identifiers to contain non-alphanumeric characters; a back-tick is escaped using a backslash. Character literals may be enclosed in single or double quotes.
    • ORACLE

      public static final Lex ORACLE
      Lexical policy similar to Oracle. The case of identifiers enclosed in double-quotes is preserved; unquoted identifiers are converted to upper-case; after which, identifiers are matched case-sensitively.
    • MYSQL

      public static final Lex MYSQL
      Lexical policy similar to MySQL. (To be precise: MySQL on Windows; MySQL on Linux uses case-sensitive matching, like the Linux file system.) The case of identifiers is preserved whether or not they quoted; after which, identifiers are matched case-insensitively. Back-ticks allow identifiers to contain non-alphanumeric characters; a back-tick is escaped using a back-tick.
    • MYSQL_ANSI

      public static final Lex MYSQL_ANSI
      Lexical policy similar to MySQL with ANSI_QUOTES option enabled. (To be precise: MySQL on Windows; MySQL on Linux uses case-sensitive matching, like the Linux file system.) The case of identifiers is preserved whether or not they quoted; after which, identifiers are matched case-insensitively. Double quotes allow identifiers to contain non-alphanumeric characters.
    • SQL_SERVER

      public static final Lex SQL_SERVER
      Lexical policy similar to Microsoft SQL Server. The case of identifiers is preserved whether or not they are quoted; after which, identifiers are matched case-insensitively. Brackets allow identifiers to contain non-alphanumeric characters.
    • JAVA

      public static final Lex JAVA
      Lexical policy similar to Java. The case of identifiers is preserved whether or not they are quoted; after which, identifiers are matched case-sensitively. Unlike Java, back-ticks allow identifiers to contain non-alphanumeric characters; a back-tick is escaped using a back-tick.
  • Field Details

    • quoting

      public final org.apache.calcite.avatica.util.Quoting quoting
    • unquotedCasing

      public final org.apache.calcite.avatica.util.Casing unquotedCasing
    • quotedCasing

      public final org.apache.calcite.avatica.util.Casing quotedCasing
    • caseSensitive

      public final boolean caseSensitive
    • charLiteralStyles

      public final Set<CharLiteralStyle> charLiteralStyles
  • Method Details

    • values

      public static Lex[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Lex valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null