ModSQL
Class Operator_Concat
java.lang.Object
|
+--ModSQL.AbstractFunction
|
+--ModSQL.Operator
|
+--ModSQL.Operator_Concat
- All Implemented Interfaces:
- Function
- final class Operator_Concat
- extends Operator
SQL operator "||".
- Author:
- chris.studholme@utoronto.ca
|
Method Summary |
Object |
evaluate(boolean aggregate)
Evaluate parameters and compute the function. |
Object |
evaluate(int match_op,
Object match_value)
Evaluate parameters and compute the function. |
String |
functionName()
Returns "#CONCAT". |
int |
getMaxResultSize()
Return the maximum number of characters that this function expects to
return in a String object. |
int |
getSQLType()
Return the SQL type of the value that this function expects to return. |
void |
optimize()
Prepare the function for use. |
| Methods inherited from class ModSQL.AbstractFunction |
addParameter, convertToSQLType, evaluateConstantParameters, evaluateOrder, evaluateParameters, evaluateParameters, getCompatableType, getObjectSQLType, getParameter, getParameterCount, isAggregate, isConstant, postfixParameters, prefixParameters, registerWith, reset, toString |
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
Operator_Concat
Operator_Concat()
optimize
public void optimize()
throws SQLException
Prepare the function for use. This method verifies that the
parameters are strings.
- Overrides:
optimize in class AbstractFunction
- Throws:
SQLException - if the parameters are invalid
functionName
public String functionName()
- Returns "#CONCAT".
- Overrides:
functionName in class AbstractFunction
- Returns:
- name of function
getSQLType
public int getSQLType()
throws SQLException
- Return the SQL type of the value that this function expects to return.
The data returned by the function must either be of this type, or null.
- Returns:
- SQL type of data to be returned
- Throws:
SQLException - if a database-access error occurs.
getMaxResultSize
public int getMaxResultSize()
throws SQLException
- Return the maximum number of characters that this function expects to
return in a String object. If the maximum size is unknown for any
of the parameter, this method returns -1.
- Returns:
- maximum size of String returned or -1 if unknown
- Throws:
SQLException - if a database-access error occurs
evaluate
public Object evaluate(boolean aggregate)
throws SQLException,
EndOfTable
- Evaluate parameters and compute the function.
- Parameters:
aggregate - passed to parameters- Returns:
- result object
- Throws:
SQLException - if a database-access error occursEndOfTable - if thrown by a parameter
evaluate
public Object evaluate(int match_op,
Object match_value)
throws SQLException,
EndOfTable
- Evaluate parameters and compute the function.
- Overrides:
evaluate in class AbstractFunction
- Parameters:
match_op - how the value should be matchedmatch_value - desired value- Returns:
- result object
- Throws:
SQLException - if a database-access error occursEndOfTable - if thrown by a parameter