|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--ModSQL.AbstractFunction
|
+--ModSQL.Function_String
SQL function for string operations.
Function_String provides: LEFT, RIGHT, UPPER, LOWER, INITCAP, LENGTH, LPAD, RPAD, and SUBSTR.
| Field Summary | |
static int |
INITCAP
Function is INITCAP(). |
static int |
LEFT
Function is LEFT(). |
static int |
LENGTH
Function is LENGTH(). |
static int |
LOWER
Function is LOWER(). |
static int |
LPAD
Function is LPAD(). |
private int |
op
Which function are we? One of the above constants. |
static int |
RIGHT
Function is RIGHT(). |
static int |
RPAD
Function is RPAD(). |
static int |
SUBSTR
Function is SUBSTR(). |
static int |
UPPER
Function is UPPER(). |
| Fields inherited from class ModSQL.AbstractFunction |
all_constant, constant_non_null, evaluate_order, evaluate_order_array, out_of_order, parameter_constant, parameter_value, parameters, parameters_array |
| Fields inherited from interface ModSQL.Function |
MATCH_BEGINS, MATCH_EQU, MATCH_GT, MATCH_GTE, MATCH_LT, MATCH_LTE, MATCH_NE |
| Constructor Summary | |
Function_String(int op)
Constructor. |
|
| Method Summary | |
Object |
evaluate(boolean aggregate)
Evaluate parameters and compute function. |
static Function |
forName(String name)
Returns a new instance of this class if name is recognized. |
String |
functionName()
Returns the name of this function for use by toString() method. |
int |
getMaxResultSize()
Returns the maximum size of any String computed by this function. |
int |
getSQLType()
Returns the SQL type of this function. |
void |
optimize()
Prepare the function for use. |
| Methods inherited from class ModSQL.AbstractFunction |
addParameter, convertToSQLType, evaluate, evaluateConstantParameters, evaluateOrder, evaluateParameters, evaluateParameters, getCompatableType, getObjectSQLType, getParameter, getParameterCount, isAggregate, isConstant, postfixParameters, prefixParameters, registerWith, reset, toString |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public static final int LEFT
public static final int RIGHT
public static final int UPPER
public static final int LOWER
public static final int INITCAP
public static final int LENGTH
public static final int LPAD
public static final int RPAD
public static final int SUBSTR
private int op
| Constructor Detail |
public Function_String(int op)
op - function type| Method Detail |
public static Function forName(String name)
name - name of function to find
public void optimize()
throws SQLException
optimize in class AbstractFunctionSQLException - if the parameters are invalid
public int getSQLType()
throws SQLException
public int getMaxResultSize()
throws SQLException
public String functionName()
functionName in class AbstractFunction
public Object evaluate(boolean aggregate)
throws SQLException,
EndOfTable
Evaluate parameters and compute function.
aggregate - passed to parametersSQLException - if a database-access error occursEndOfTable - if thrown by a parameter
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||