Package org.apache.calcite.sql
Enum SqlSyntax
- java.lang.Object
-
- java.lang.Enum<SqlSyntax>
-
- org.apache.calcite.sql.SqlSyntax
-
-
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.
-
-
-
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".
-
FUNCTION_ID
public static final SqlSyntax FUNCTION_ID
Function syntax which takes no parentheses if there are no arguments, for example "CURRENTTIME".- See Also:
SqlConformance.allowNiladicParentheses()
-
INTERNAL
public static final SqlSyntax INTERNAL
Syntax of an internal operator, which does not appear in the SQL.
-
-
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 namejava.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.
-
-