org.eigenbase.sql.fun
Class SqlDatetimeSubtractionOperator
java.lang.Object
org.eigenbase.sql.SqlOperator
org.eigenbase.sql.SqlSpecialOperator
org.eigenbase.sql.fun.SqlDatetimeSubtractionOperator
public class SqlDatetimeSubtractionOperator
- extends SqlSpecialOperator
A special operator for the subtraction of two DATETIMEs. The format of
DATETIME substraction is:
"(" <datetime> "-" <datetime> ")"
. This operator is special since it needs to hold the
additional interval qualifier specification.
- Version:
- $Id: //open/dev/farrago/src/org/eigenbase/sql/fun/SqlDatetimeSubtractionOperator.java#11 $
- Author:
- Wael Chatila
Methods inherited from class org.eigenbase.sql.SqlOperator |
acceptCall, acceptCall, adjustType, argumentMustBeScalar, checkOperandCount, checkOperandTypes, createCall, createCall, createCall, createCall, deriveType, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getName, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, hashCode, inferReturnType, inferReturnType, isAggregator, isDeterministic, isDynamicFunction, isName, leftPrec, preValidateCall, requiresDecimalExpansion, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateCall, validateOperands |
SqlDatetimeSubtractionOperator
public SqlDatetimeSubtractionOperator()
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
getMonotonicity
public SqlMonotonicity getMonotonicity(SqlCall call,
SqlValidatorScope scope)
- Description copied from class:
SqlOperator
- Returns whether this operator is monotonic.
Default implementation returns SqlMonotonicity.NotMonotonic
.
- Overrides:
getMonotonicity
in class SqlOperator
- Parameters:
call
- Call to this operatorscope
- Scope in which the call occurs