|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
A row constructor (in SQL speak) is a single row of one or more columns. This interface extends Function by adding methods to access specific columns. The corresponding methods in the Function interface that do not have the column parameter should work as specified in the case of a single column, but should throw an exception in the case of two or more columns.
| Fields inherited from interface ModSQL.Function |
MATCH_BEGINS, MATCH_EQU, MATCH_GT, MATCH_GTE, MATCH_LT, MATCH_LTE, MATCH_NE |
| Method Summary | |
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 numColumns(). |
int |
getColumnCount()
Returns the number of columns the row has. |
int |
getMaxResultSize(int column)
Return the maximum number of characters String values in the specified column will have. |
int |
getSQLType(int column)
Return the SQL type of the value in the specified column. |
| Methods inherited from interface ModSQL.Function |
addParameter, evaluate, evaluate, evaluateOrder, getMaxResultSize, getParameter, getParameterCount, getSQLType, isAggregate, isConstant, optimize, registerWith, reset |
| Method Detail |
public int getColumnCount()
throws SQLException
Returns the number of columns the row has. The row will always have at least one column.
This method can only be used after optimize() has been called.
SQLException - if a database-access error occurs
public int getSQLType(int column)
throws SQLException
Return the SQL type of the value in the specified column.
Function.getSQLType() should work as specified if this row has only one column, but must throw an exception in the case of two or more columns.
This method can only be used after optimize() has been called.
column - column number (starting from zero)SQLException - if an error occursIndexOutOfBoundsException - if the column if out of range
public int getMaxResultSize(int column)
throws SQLException
Return the maximum number of characters String values in the specified column will have. If the column is not of String type or if the maximum length is not known, -1 should be returned.
Function.getMaxResultSize() should work as specified if this row has only one column, but must throw an exception in the case of two or more columns.
This method can only be used after optimize() has been called.
column - column number (starting from zero)SQLException - if an error occursIndexOutOfBoundsException - if the column if out of range
public Object[] evaluateRow(boolean aggregate)
throws SQLException,
EndOfTable
Evaluate each column of the row and return the results as an array of length equal to the value returned by numColumns(). If the row is the result of a subquery with no rows, the result will be an array of NULL values.
The evaluate() methods in Function should work as specified if this row has only one column, but must throw an exception in the case of two or more columns.
This method can only be used after optimize() has been called.
aggregate - final evaluation of aggregatesSQLException - if an error occursEndOfTable - if a database was advanced beyond the end of the table
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||