|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--ModSQL.AbstractFunction
|
+--ModSQL.LiteralRow
This class represents a literal row constructor. That is, a row constructor of the form '(value,...)', where each value is of type Function.
Columns are added to the row constructor using the addParameter() method.
| 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 | |
LiteralRow()
Default constructor (no columns). |
|
LiteralRow(Function first_column)
Constructor to set first column. |
|
| Method Summary | |
Object |
evaluate(boolean aggregate)
Evaluate row. |
Object |
evaluate(int match_op,
Object match_value)
Evaluate row. |
Object[] |
evaluateRow(boolean aggregate)
Evaluate each column of the row and return the results as an array of length equal to the value returned by getColumnCount(). |
String |
functionName()
Function name is blank (empty String) for row constructors. |
int |
getColumnCount()
Returns the number of columns the row has. |
int |
getMaxResultSize()
Return the maximum number of characters that this function expects to return in a String object. |
int |
getMaxResultSize(int column)
Return the maximum number of characters String values in the specified column will have. |
int |
getSQLType()
Return the SQL type of the value that this function expects to return. |
int |
getSQLType(int column)
Return the SQL type of the value in the specified column. |
void |
optimize()
Prepare the row for use. |
String |
toString()
Returns "column1" or "(column1,column2,...)". |
| Methods inherited from class ModSQL.AbstractFunction |
addParameter, convertToSQLType, evaluateConstantParameters, evaluateOrder, evaluateParameters, evaluateParameters, getCompatableType, getObjectSQLType, getParameter, getParameterCount, isAggregate, isConstant, postfixParameters, prefixParameters, registerWith, reset |
| Methods inherited from class java.lang.Object |
|
| Methods inherited from interface ModSQL.Function |
addParameter, evaluateOrder, getParameter, getParameterCount, isAggregate, isConstant, registerWith, reset |
| Constructor Detail |
public LiteralRow()
public LiteralRow(Function first_column)
throws SQLException
first_column - Function representing first columnSQLException - if an error occurs| Method Detail |
public void optimize()
throws SQLException
optimize in interface Functionoptimize in class AbstractFunctionSQLException - if an error occurspublic String functionName()
functionName in class AbstractFunctionModSQL.AbstractFunctionpublic String toString()
toString in class AbstractFunctionpublic int getColumnCount()
Returns the number of columns the row has. The row will always have at least one column.
This method should only be called after optimize().
getColumnCount in interface RowConstructor
public int getSQLType()
throws SQLException
getSQLType in interface FunctionSQLException - if an error occurs
public int getSQLType(int column)
throws SQLException
getSQLType in interface RowConstructorcolumn - column number (starting from zero)SQLException - if an error occurs
public int getMaxResultSize()
throws SQLException
getMaxResultSize in interface FunctionSQLException - if an error occurs
public int getMaxResultSize(int column)
throws SQLException
getMaxResultSize in interface RowConstructorcolumn - column number (starting from zero)SQLException - if an error occurs
public Object evaluate(boolean aggregate)
throws SQLException,
EndOfTable
evaluate in interface Functionaggregate - true to return final aggregate valueSQLException - if an error occursEndOfTable - if thrown by a column
public Object evaluate(int match_op,
Object match_value)
throws SQLException,
EndOfTable
evaluate in interface Functionevaluate in class AbstractFunctionmatch_op - how desired value is matchedmatch_value - value to match toSQLException - if an error occursEndOfTable - if thrown by a column
public Object[] evaluateRow(boolean aggregate)
throws SQLException,
EndOfTable
evaluateRow in interface RowConstructorSQLException - if an error occursEndOfTable - if thrown by a column
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||