![]() |
Quadcap Embeddable Database |
Inheritance diagram for com.quadcap.sql.AggregateCursor:

GroupByCursor to handle aggregate functions (e.g., SUM, AVG, etc.) with a GROUP BY clause.
Definition at line 56 of file AggregateCursor.java.
Public Member Functions | |
| AggregateCursor (Session session, Cursor cursor, GroupByCursor gcursor, Vector aggregates) throws SQLException | |
| void | resetAggregates () throws SQLException |
| void | updateAggregates (Cursor c) throws SQLException |
| Row | getRow () throws SQLException |
| Derived class implements this function to return the current cursor row. | |
| void | updateRow (Row row) throws SQLException |
| Replace the current cursor row with the specified row. | |
| void | deleteRow () throws SQLException |
| Delete the current cursor row. | |
| void | beforeFirst () throws SQLException |
| Position the cursor before the first row. | |
| boolean | next () throws SQLException |
| This routine returns the next element of an aggregate cursor, i.e., one which uses SUM, COUNT, AVG, MAX, or MIN. | |
| boolean | isWritable (int col) throws SQLException |
| Return true if the specified column is writable. | |
| long | size () |
| We don't know the size. | |
| void | close () throws SQLException |
| Close the cursor and free up any resources (including closing the cursor's transaction if that is feasible) used by the cursor. | |
Package Attributes | |
| GroupByCursor | gcursor = null |
| Vector | aggregates = null |
| Row | row = null |
| int | currentRowNum = 0 |
| boolean | first = true |
| boolean | isItemCursor = false |
| ItemsCursor | itemsCursor = null |
| Cursor | baseCursor = null |
|
||||||||||||||||||||
|
|
Position the cursor before the first row.
Reimplemented from com.quadcap.sql.FilterCursor. Definition at line 117 of file AggregateCursor.java. References com.quadcap.sql.Cursor.beforeFirst(), and com.quadcap.sql.AggregateCursor.first. |
|
|
Close the cursor and free up any resources (including closing the cursor's transaction if that is feasible) used by the cursor.
Reimplemented from com.quadcap.sql.FilterCursor. Definition at line 173 of file AggregateCursor.java. References com.quadcap.sql.Cursor.close(), and com.quadcap.sql.AggregateCursor.resetAggregates(). |
|
|
Delete the current cursor row.
Reimplemented from com.quadcap.sql.FilterCursor. Definition at line 112 of file AggregateCursor.java. |
|
|
Derived class implements this function to return the current cursor row. Implementation required. Reimplemented from com.quadcap.sql.FilterCursor. Definition at line 103 of file AggregateCursor.java. References com.quadcap.sql.AggregateCursor.row. |
|
|
Return true if the specified column is writable.
Reimplemented from com.quadcap.sql.FilterCursor. Definition at line 164 of file AggregateCursor.java. References com.quadcap.sql.AggregateCursor.isWritable(). Referenced by com.quadcap.sql.AggregateCursor.isWritable(). |
|
|
This routine returns the next element of an aggregate cursor, i.e., one which uses SUM, COUNT, AVG, MAX, or MIN. If GROUP BY is not specified, 'next()' simply fetches all of the underlying rows, updating the aggregate expressions after each row. If there is a GROUP BY clause, we have to keep track of when a new group starts using our associated group-by cursor. Reimplemented from com.quadcap.sql.FilterCursor. Definition at line 132 of file AggregateCursor.java. References com.quadcap.sql.AggregateCursor.baseCursor, com.quadcap.sql.AggregateCursor.first, com.quadcap.sql.AggregateCursor.gcursor, com.quadcap.sql.ItemsCursor.getEmptyAggregate(), com.quadcap.sql.Cursor.getRow(), com.quadcap.sql.AggregateCursor.isItemCursor, com.quadcap.sql.AggregateCursor.itemsCursor, com.quadcap.sql.GroupByCursor.lastRowOfGroup(), com.quadcap.sql.Cursor.next(), com.quadcap.sql.AggregateCursor.resetAggregates(), and com.quadcap.sql.AggregateCursor.row. |
|
|
Definition at line 81 of file AggregateCursor.java. References com.quadcap.sql.AggregateCursor.aggregates. Referenced by com.quadcap.sql.AggregateCursor.close(), and com.quadcap.sql.AggregateCursor.next(). |
|
|
We don't know the size.
Reimplemented from com.quadcap.sql.FilterCursor. Definition at line 171 of file AggregateCursor.java. |
|
|
Definition at line 93 of file AggregateCursor.java. References com.quadcap.sql.AggregateCursor.aggregates, com.quadcap.sql.AggregateExpression.updateAggregate(), and com.quadcap.sql.AggregateCursor.updateAggregates(). Referenced by com.quadcap.sql.AggregateCursor.updateAggregates(). |
|
|
Replace the current cursor row with the specified row.
Reimplemented from com.quadcap.sql.FilterCursor. Definition at line 107 of file AggregateCursor.java. References com.quadcap.sql.AggregateCursor.updateRow(). Referenced by com.quadcap.sql.AggregateCursor.updateRow(). |
|
|
Definition at line 58 of file AggregateCursor.java. Referenced by com.quadcap.sql.AggregateCursor.AggregateCursor(), com.quadcap.sql.AggregateCursor.resetAggregates(), and com.quadcap.sql.AggregateCursor.updateAggregates(). |
|
|
Definition at line 64 of file AggregateCursor.java. Referenced by com.quadcap.sql.AggregateCursor.AggregateCursor(), and com.quadcap.sql.AggregateCursor.next(). |
|
|
Definition at line 60 of file AggregateCursor.java. |
|
|
Definition at line 61 of file AggregateCursor.java. Referenced by com.quadcap.sql.AggregateCursor.beforeFirst(), and com.quadcap.sql.AggregateCursor.next(). |
|
|
Definition at line 57 of file AggregateCursor.java. Referenced by com.quadcap.sql.AggregateCursor.AggregateCursor(), and com.quadcap.sql.AggregateCursor.next(). |
|
|
Definition at line 62 of file AggregateCursor.java. Referenced by com.quadcap.sql.AggregateCursor.AggregateCursor(), and com.quadcap.sql.AggregateCursor.next(). |
|
|
Definition at line 63 of file AggregateCursor.java. Referenced by com.quadcap.sql.AggregateCursor.AggregateCursor(), and com.quadcap.sql.AggregateCursor.next(). |
|
|
Definition at line 59 of file AggregateCursor.java. Referenced by com.quadcap.sql.AggregateCursor.getRow(), and com.quadcap.sql.AggregateCursor.next(). |