org.eigenbase.sql
Class SqlInfixOperator
java.lang.Object
org.eigenbase.sql.SqlOperator
org.eigenbase.sql.SqlSpecialOperator
org.eigenbase.sql.SqlInfixOperator
- Direct Known Subclasses:
- SqlBetweenOperator
public class SqlInfixOperator
- extends SqlSpecialOperator
A generalization of a binary operator to involve several (two or more)
arguments, and keywords between each pair of arguments.
For example, the BETWEEN
operator is ternary, and has syntax
exp1 BETWEEN exp2 AND exp3
.
- Since:
- Aug 8, 2004
- Version:
- $Id: //open/dev/farrago/src/org/eigenbase/sql/SqlInfixOperator.java#11 $
- Author:
- jhyde
Method Summary |
SqlSyntax |
getSyntax()
Returns the syntactic type of this operator. |
(package private) boolean |
needsSpace()
|
void |
unparse(SqlWriter writer,
SqlNode[] operands,
int leftPrec,
int rightPrec)
Writes a SQL representation of a call to this operator to a writer,
including parentheses if the operators on either side are of greater
precedence. |
Methods inherited from class org.eigenbase.sql.SqlOperator |
acceptCall, acceptCall, adjustType, argumentMustBeScalar, checkOperandCount, checkOperandTypes, createCall, createCall, createCall, createCall, deriveType, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getName, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, hashCode, inferReturnType, inferReturnType, isAggregator, isDeterministic, isDynamicFunction, isName, leftPrec, preValidateCall, requiresDecimalExpansion, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateCall, validateOperands |
names
private final String[] names
SqlInfixOperator
protected SqlInfixOperator(String[] names,
SqlKind kind,
int precedence,
SqlReturnTypeInference returnTypeInference,
SqlOperandTypeInference operandTypeInference,
SqlOperandTypeChecker operandTypeChecker)
getSyntax
public SqlSyntax getSyntax()
- Description copied from class:
SqlOperator
- Returns the syntactic type of this operator.
- Overrides:
getSyntax
in class SqlSpecialOperator
unparse
public void unparse(SqlWriter writer,
SqlNode[] operands,
int leftPrec,
int rightPrec)
- Description copied from class:
SqlOperator
- Writes a SQL representation of a call to this operator to a writer,
including parentheses if the operators on either side are of greater
precedence.
The default implementation of this method delegates to SqlSyntax.unparse(org.eigenbase.sql.SqlWriter, org.eigenbase.sql.SqlOperator, org.eigenbase.sql.SqlNode[], int, int)
.
- Overrides:
unparse
in class SqlSpecialOperator
needsSpace
boolean needsSpace()