Enum SqlLibrary

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

    public enum SqlLibrary
    extends java.lang.Enum<SqlLibrary>
    A library is a collection of SQL functions and operators.

    Typically, such collections are associated with a particular dialect or database. For example, ORACLE is a collection of functions that are in the Oracle database but not the SQL standard.

    In SqlLibraryOperatorTableFactory this annotation is applied to function definitions to include them in a particular library. It allows an operator to belong to more than one library.

    See Also:
    LibraryOperator
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      MYSQL
      A collection of operators that are in MySQL but not in standard SQL.
      ORACLE
      A collection of operators that are in Oracle but not in standard SQL.
      POSTGRESQL
      A collection of operators that are in PostgreSQL but not in standard SQL.
      SPATIAL
      Geospatial operators.
      STANDARD
      The standard operators.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String abbrev
      Abbreviation for the library used in SQL reference.
      java.lang.String fun
      Name of this library when it appears in the connect string; see CalciteConnectionProperty.FUN.
      static java.util.Map<java.lang.String,​SqlLibrary> MAP  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private SqlLibrary​(java.lang.String abbrev)  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static SqlLibrary of​(java.lang.String name)
      Looks up a value.
      static java.util.List<SqlLibrary> parse​(java.lang.String libraryNameList)
      Parses a comma-separated string such as "standard,oracle".
      static SqlLibrary valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static SqlLibrary[] 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

      • STANDARD

        public static final SqlLibrary STANDARD
        The standard operators.
      • SPATIAL

        public static final SqlLibrary SPATIAL
        Geospatial operators.
      • MYSQL

        public static final SqlLibrary MYSQL
        A collection of operators that are in MySQL but not in standard SQL.
      • ORACLE

        public static final SqlLibrary ORACLE
        A collection of operators that are in Oracle but not in standard SQL.
      • POSTGRESQL

        public static final SqlLibrary POSTGRESQL
        A collection of operators that are in PostgreSQL but not in standard SQL.
    • Field Detail

      • abbrev

        public final java.lang.String abbrev
        Abbreviation for the library used in SQL reference.
      • MAP

        public static final java.util.Map<java.lang.String,​SqlLibrary> MAP
    • Constructor Detail

      • SqlLibrary

        private SqlLibrary​(java.lang.String abbrev)
    • Method Detail

      • values

        public static SqlLibrary[] 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 (SqlLibrary c : SqlLibrary.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static SqlLibrary 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
      • of

        public static SqlLibrary of​(java.lang.String name)
        Looks up a value. Returns null if not found. You can use upper- or lower-case name.
      • parse

        public static java.util.List<SqlLibrary> parse​(java.lang.String libraryNameList)
        Parses a comma-separated string such as "standard,oracle".