|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eigenbase.sql.SqlOperator org.eigenbase.sql.SqlFunction org.eigenbase.sql.fun.SqlSubstringFunction
public class SqlSubstringFunction
Definition of the "SUBSTRING" builtin SQL function.
Field Summary |
---|
Fields inherited from class org.eigenbase.sql.SqlOperator |
---|
MaxPrec, NL |
Constructor Summary | |
---|---|
SqlSubstringFunction()
Creates the SqlSubstringFunction. |
Method Summary | |
---|---|
boolean |
checkOperandTypes(SqlCallBinding callBinding,
boolean throwOnFailure)
Checks that the operand values in a SqlCall to this operator are
valid. |
String |
getAllowedSignatures(String opName)
Returns a string describing the expected operand types of a call, e.g. |
SqlMonotonicity |
getMonotonicity(SqlCall call,
SqlValidatorScope scope)
Returns whether this operator is monotonic. |
SqlOperandCountRange |
getOperandCountRange()
Returns a constraint on the number of operands expected by this operator. |
String |
getSignatureTemplate(int operandsCount)
Returns a template describing how the operator signature is to be built. |
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.SqlFunction |
---|
deriveType, getFunctionType, getNameAsId, getParamTypes, getSqlIdentifier, getSyntax, isQuantifierAllowed, validateCall, validateQuantifier |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
SqlSubstringFunction()
Method Detail |
---|
public String getSignatureTemplate(int operandsCount)
SqlOperator
getSignatureTemplate
in class SqlOperator
operandsCount
- is used with functions that can take a variable
number of operands
public String getAllowedSignatures(String opName)
SqlOperator
getAllowedSignatures
in class SqlOperator
public boolean checkOperandTypes(SqlCallBinding callBinding, boolean throwOnFailure)
SqlOperator
SqlCall
to this operator are
valid. Subclasses must either override this method or supply an instance
of SqlOperandTypeChecker
to the constructor.
checkOperandTypes
in class SqlOperator
callBinding
- description of callthrowOnFailure
- whether to throw an exception if check fails
(otherwise returns false in that case)
public SqlOperandCountRange getOperandCountRange()
SqlOperator
SqlOperandTypeChecker
associated with this
operator.
getOperandCountRange
in class SqlOperator
public void unparse(SqlWriter writer, SqlNode[] operands, int leftPrec, int rightPrec)
SqlOperator
The default implementation of this method delegates to SqlSyntax.unparse(org.eigenbase.sql.SqlWriter, org.eigenbase.sql.SqlOperator, org.eigenbase.sql.SqlNode[], int, int)
.
unparse
in class SqlFunction
public SqlMonotonicity getMonotonicity(SqlCall call, SqlValidatorScope scope)
SqlOperator
Default implementation returns SqlMonotonicity.NotMonotonic
.
getMonotonicity
in class SqlOperator
call
- Call to this operatorscope
- Scope in which the call occurs
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |