Enum SqlSyntax

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

    public enum SqlSyntax
    extends java.lang.Enum<SqlSyntax>
    Enumeration of possible syntactic types of operators.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      BINARY
      Binary operator syntax, as in "x + y".
      FUNCTION
      Function syntax, as in "Foo(x, y)".
      FUNCTION_ID
      Function syntax which takes no parentheses if there are no arguments, for example "CURRENTTIME".
      FUNCTION_STAR
      Function syntax, as in "Foo(x, y)", but uses "*" if there are no arguments, for example "COUNT(*)".
      INTERNAL
      Syntax of an internal operator, which does not appear in the SQL.
      POSTFIX
      Postfix unary operator syntax, as in "x ++".
      PREFIX
      Prefix unary operator syntax, as in "- x".
      SPECIAL
      Special syntax, such as that of the SQL CASE operator, "CASE x WHEN 1 THEN 2 ELSE 3 END".
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private SqlSyntax()  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract void unparse​(SqlWriter writer, SqlOperator operator, SqlCall call, int leftPrec, int rightPrec)
      Converts a call to an operator of this syntax into a string.
      static SqlSyntax valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static SqlSyntax[] 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

      • FUNCTION

        public static final SqlSyntax FUNCTION
        Function syntax, as in "Foo(x, y)".
      • FUNCTION_STAR

        public static final SqlSyntax FUNCTION_STAR
        Function syntax, as in "Foo(x, y)", but uses "*" if there are no arguments, for example "COUNT(*)".
      • BINARY

        public static final SqlSyntax BINARY
        Binary operator syntax, as in "x + y".
      • PREFIX

        public static final SqlSyntax PREFIX
        Prefix unary operator syntax, as in "- x".
      • POSTFIX

        public static final SqlSyntax POSTFIX
        Postfix unary operator syntax, as in "x ++".
      • SPECIAL

        public static final SqlSyntax SPECIAL
        Special syntax, such as that of the SQL CASE operator, "CASE x WHEN 1 THEN 2 ELSE 3 END".
      • INTERNAL

        public static final SqlSyntax INTERNAL
        Syntax of an internal operator, which does not appear in the SQL.
    • Constructor Detail

      • SqlSyntax

        private SqlSyntax()
    • Method Detail

      • values

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

        public static SqlSyntax 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
      • unparse

        public abstract void unparse​(SqlWriter writer,
                                     SqlOperator operator,
                                     SqlCall call,
                                     int leftPrec,
                                     int rightPrec)
        Converts a call to an operator of this syntax into a string.