Enum Lex

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Lex>

    public enum Lex
    extends java.lang.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 Summary

      Enum Constants 
      Enum Constant Description
      JAVA
      Lexical policy similar to Java.
      MYSQL
      Lexical policy similar to MySQL.
      MYSQL_ANSI
      Lexical policy similar to MySQL with ANSI_QUOTES option enabled.
      ORACLE
      Lexical policy similar to Oracle.
      SQL_SERVER
      Lexical policy similar to Microsoft SQL Server.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      boolean caseSensitive  
      org.apache.calcite.avatica.util.Casing quotedCasing  
      org.apache.calcite.avatica.util.Quoting quoting  
      org.apache.calcite.avatica.util.Casing unquotedCasing  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Lex​(org.apache.calcite.avatica.util.Quoting quoting, org.apache.calcite.avatica.util.Casing unquotedCasing, org.apache.calcite.avatica.util.Casing quotedCasing, boolean caseSensitive)  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Lex valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Lex[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • 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.
      • 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.
    • Field Detail

      • 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
    • Constructor Detail

      • Lex

        private Lex​(org.apache.calcite.avatica.util.Quoting quoting,
                    org.apache.calcite.avatica.util.Casing unquotedCasing,
                    org.apache.calcite.avatica.util.Casing quotedCasing,
                    boolean caseSensitive)
    • Method Detail

      • values

        public static Lex[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Lex c : Lex.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Lex valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null