Package org.apache.calcite.sql
Enum SqlSyntax
- All Implemented Interfaces:
Serializable
,Comparable<SqlSyntax>
,Constable
Enumeration of possible syntactic types of
operators
.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionBinary operator syntax, as in "x + y".Function syntax, as in "Foo(x, y)".Function syntax which takes no parentheses if there are no arguments, for example "CURRENTTIME".Function syntax, as in "Foo(x, y)", but uses "*" if there are no arguments, for example "COUNT(*)".Syntax of an internal operator, which does not appear in the SQL.Function syntax with optional ORDER BY, as in "STRING_AGG(x, y ORDER BY z)".Postfix unary operator syntax, as in "x ++".Prefix unary operator syntax, as in "- x".Special syntax, such as that of the SQL CASE operator, "CASE x WHEN 1 THEN 2 ELSE 3 END". -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract 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
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 Details
-
FUNCTION
Function syntax, as in "Foo(x, y)". -
FUNCTION_STAR
Function syntax, as in "Foo(x, y)", but uses "*" if there are no arguments, for example "COUNT(*)". -
ORDERED_FUNCTION
Function syntax with optional ORDER BY, as in "STRING_AGG(x, y ORDER BY z)". -
BINARY
Binary operator syntax, as in "x + y". -
PREFIX
Prefix unary operator syntax, as in "- x". -
POSTFIX
Postfix 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". -
FUNCTION_ID
Function syntax which takes no parentheses if there are no arguments, for example "CURRENTTIME".- See Also:
-
INTERNAL
Syntax of an internal operator, which does not appear in the SQL.
-
-
Field Details
-
family
Syntax to treat this syntax as equivalent to when resolving operators.
-
-
Method Details
-
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
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 nameNullPointerException
- 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.
-