|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface RowOrdering
This interface provides a representation of the ordering of rows in a ResultSet.
| Field Summary | |
|---|---|
static int |
ASCENDING
|
static int |
DESCENDING
|
static int |
DONTCARE
|
| Method Summary | |
|---|---|
void |
addOrderedColumn(int direction,
int tableNumber,
int columnNumber)
Add a column to this RowOrdering in the current order position. |
void |
addUnorderedOptimizable(Optimizable optimizable)
Add an unordered optimizable to this RowOrdering. |
boolean |
alwaysOrdered(int tableNumber)
Ask whether the given table is always ordered. |
void |
columnAlwaysOrdered(Optimizable optimizable,
int columnNumber)
Tell this RowOrdering that it is always ordered on the given column of the given optimizable. |
void |
copy(RowOrdering copyTo)
Copy the contents of this RowOrdering to the given RowOrdering. |
boolean |
isColumnAlwaysOrdered(int tableNumber,
int columnNumber)
Return true if the column is always ordered. |
void |
nextOrderPosition(int direction)
Move to the next order position for adding ordered columns. |
void |
optimizableAlwaysOrdered(Optimizable optimizable)
Tell this RowOrdering that it is always ordered on the given optimizable This is useful when considering a unique index where there is an equality match on the entire key - in this case, all the columns are ordered, regardless of the direction or position, or even whether the columns are in the index. |
boolean |
orderedOnColumn(int direction,
int tableNumber,
int columnNumber)
Tell whether this ordering is ordered on the given column. |
boolean |
orderedOnColumn(int direction,
int orderPosition,
int tableNumber,
int columnNumber)
Tell whether this ordering is ordered on the given column in the given position |
void |
removeOptimizable(int tableNumber)
Tell this row ordering that it is no longer ordered on the given table. |
| Field Detail |
|---|
static final int ASCENDING
static final int DESCENDING
static final int DONTCARE
| Method Detail |
|---|
boolean orderedOnColumn(int direction,
int orderPosition,
int tableNumber,
int columnNumber)
throws StandardException
direction - One of ASCENDING, DESCENDING, or DONTCARE
depending on the requirements of the caller.
An ORDER BY clause cares about direction,
while DISTINCT and GROUP BY do not.orderPosition - The position in the ordering list. For example,
for ORDER BY A, B, position 0 has column A,
and position 1 has column B. Note that for an
ordering, more than one column can be in a single
ordering position: for example, in the query
SELECT * FROM S, T WHERE S.A = T.B ORDER BY T.B
columns S.A and T.B will be in the same ordering
positions because they are equal. Also, constant
values are considered ordered in all positions
(consider SELECT A FROM T WHERE A = 1 ORDER BY A).tableNumber - The table number of the Optimizable containing
the column in questioncolumnNumber - The column number in the table (one-based).
StandardException - Thrown on error
boolean orderedOnColumn(int direction,
int tableNumber,
int columnNumber)
throws StandardException
direction - One of ASCENDING, DESCENDING, or DONTCARE
depending on the requirements of the caller.
An ORDER BY clause cares about direction,
while DISTINCT and GROUP BY do not.tableNumber - The table number of the Optimizable containing
the column in questioncolumnNumber - The column number in the table (one-based).
StandardException - Thrown on error
void addOrderedColumn(int direction,
int tableNumber,
int columnNumber)
direction - One of ASCENDING, DESCENDING, or DONTCARE.
DONTCARE can be used for things like columns
with constant value, and for one-row tables.tableNumber - The table the column is in.columnNumber - The column number in the table (one-based)void nextOrderPosition(int direction)
direction - One of ASCENDING, DESCENDING, or DONTCARE.
DONTCARE can be used for things like columns
with constant value, and for one-row tables.void optimizableAlwaysOrdered(Optimizable optimizable)
optimizable - The table in question
void columnAlwaysOrdered(Optimizable optimizable,
int columnNumber)
optimizable - The table in questioncolumnNumber - The number of the column in question.
boolean isColumnAlwaysOrdered(int tableNumber,
int columnNumber)
tableNumber - The table in questioncolumnNumber - The number of the column in question.
boolean alwaysOrdered(int tableNumber)
void removeOptimizable(int tableNumber)
tableNumber - The number of the table to remove from
this RowOrdering.void addUnorderedOptimizable(Optimizable optimizable)
void copy(RowOrdering copyTo)
|
Built on Wed 2013-06-12 15:21:56+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||