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

This cursor shares some functionality with the GroupByCursor class, and factorization should be investigated.
Definition at line 72 of file MergeCursor.java.
Public Member Functions | |
| MergeCursor (Session session, int op, boolean all, TempTableMerge tempTable) throws SQLException | |
| Row | getRow () throws SQLException |
| Derived class implements this function to return the current cursor row. | |
| void | checkCursor () throws IOException |
| long | getRowId () |
| Some cursors have rows where the rows can be identified by row id, and sometimes the cursors even know the row id for the current row. | |
| void | resolveColumns () throws SQLException |
| Once all of the column names are available, we can look for duplicates and shortest-unique names, etc. | |
| String | getName () |
| Return the tuple's name. | |
| long | size () throws SQLException |
| If the underlying implementation knows, or can compute cheaply, the actual size of the ResultSet, it should return a non-negative number here. | |
| void | afterLast () throws SQLException |
| Position the cursor after the last row. | |
| boolean | isWritable (int col) |
| Return true if the specified column is writable. | |
| boolean | next () throws SQLException |
| Advance the cursor and return true if we advanced to a valid 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. | |
| void | close () throws SQLException |
| On close, we release the resources. | |
Package Functions | |
| boolean | nextUnion () throws SQLException, IOException |
| Separate from 'nextUnionAll' because we can avoid fetching the data for this case. | |
| boolean | nextUnionAll () throws SQLException, IOException |
| Fetch the data once when we fetch the counts, then return each row the required number of times. | |
| boolean | nextIntersect () throws SQLException, IOException |
| boolean | nextExcept () throws SQLException, IOException |
Package Attributes | |
| int | op |
| boolean | all |
| TempTableMerge | tempTable |
| LazyRow | row = null |
| BCursor | bc = null |
| int | duplicateCount = 0 |
|
||||||||||||||||||||
|
Definition at line 80 of file MergeCursor.java. References com.quadcap.sql.MergeCursor.all, com.quadcap.sql.MergeCursor.op, and com.quadcap.sql.MergeCursor.tempTable. |
|
|
Position the cursor after the last row.
Implements com.quadcap.sql.CursorImpl. Definition at line 122 of file MergeCursor.java. |
|
|
Position the cursor before the first row.
Implements com.quadcap.sql.CursorImpl. Definition at line 156 of file MergeCursor.java. References com.quadcap.sql.MergeCursor.bc, com.quadcap.sql.MergeCursor.checkCursor(), and com.quadcap.sql.MergeCursor.duplicateCount. Referenced by com.quadcap.sql.MergeCursor.resolveColumns(). |
|
|
Definition at line 94 of file MergeCursor.java. References com.quadcap.sql.MergeCursor.bc, com.quadcap.sql.TempTable.getCursor(), and com.quadcap.sql.MergeCursor.tempTable. Referenced by com.quadcap.sql.MergeCursor.beforeFirst(), com.quadcap.sql.MergeCursor.next(), and com.quadcap.sql.MergeCursor.size(). |
|
|
On close, we release the resources.
Implements com.quadcap.sql.CursorImpl. Definition at line 241 of file MergeCursor.java. References com.quadcap.sql.MergeCursor.bc, com.quadcap.sql.TempTable.release(), and com.quadcap.sql.MergeCursor.tempTable. |
|
|
Delete the current cursor row.
Implements com.quadcap.sql.CursorImpl. Definition at line 151 of file MergeCursor.java. |
|
|
Return the tuple's name.
Reimplemented from com.quadcap.sql.TupleImpl. Definition at line 111 of file MergeCursor.java. |
|
|
Derived class implements this function to return the current cursor row. Implementation required. Implements com.quadcap.sql.CursorImpl. Definition at line 90 of file MergeCursor.java. References com.quadcap.sql.MergeCursor.row. |
|
|
Some cursors have rows where the rows can be identified by row id, and sometimes the cursors even know the row id for the current row. If you know, tell us here! If you don't know, just return 0. Reimplemented from com.quadcap.sql.CursorImpl. Definition at line 100 of file MergeCursor.java. References com.quadcap.sql.MergeCursor.bc. |
|
|
Return true if the specified column is writable.
Implements com.quadcap.sql.CursorImpl. Definition at line 126 of file MergeCursor.java. References com.quadcap.sql.MergeCursor.isWritable(). Referenced by com.quadcap.sql.MergeCursor.isWritable(). |
|
|
Advance the cursor and return true if we advanced to a valid row.
Implements com.quadcap.sql.CursorImpl. Definition at line 128 of file MergeCursor.java. References com.quadcap.sql.MergeCursor.all, com.quadcap.sql.MergeCursor.checkCursor(), com.quadcap.sql.MergeCursor.nextExcept(), com.quadcap.sql.MergeCursor.nextIntersect(), com.quadcap.sql.MergeCursor.nextUnion(), com.quadcap.sql.MergeCursor.nextUnionAll(), and com.quadcap.sql.MergeCursor.op. |
|
|
Definition at line 216 of file MergeCursor.java. References com.quadcap.sql.MergeCursor.all, com.quadcap.sql.MergeCursor.bc, com.quadcap.sql.MergeCursor.duplicateCount, com.quadcap.sql.TempTable.getRow(), com.quadcap.sql.MergeCursor.row, and com.quadcap.sql.MergeCursor.tempTable. Referenced by com.quadcap.sql.MergeCursor.next(). |
|
|
Definition at line 194 of file MergeCursor.java. References com.quadcap.sql.MergeCursor.all, com.quadcap.sql.MergeCursor.bc, com.quadcap.sql.MergeCursor.duplicateCount, com.quadcap.sql.TempTable.getRow(), com.quadcap.sql.MergeCursor.row, and com.quadcap.sql.MergeCursor.tempTable. Referenced by com.quadcap.sql.MergeCursor.next(). |
|
|
Separate from 'nextUnionAll' because we can avoid fetching the data for this case.
Definition at line 171 of file MergeCursor.java. References com.quadcap.sql.MergeCursor.bc, com.quadcap.sql.TempTable.getRow(), com.quadcap.sql.MergeCursor.row, and com.quadcap.sql.MergeCursor.tempTable. Referenced by com.quadcap.sql.MergeCursor.next(). |
|
|
Fetch the data once when we fetch the counts, then return each row the required number of times.
Definition at line 181 of file MergeCursor.java. References com.quadcap.sql.MergeCursor.bc, com.quadcap.sql.MergeCursor.duplicateCount, com.quadcap.sql.TempTable.getRow(), com.quadcap.sql.MergeCursor.row, and com.quadcap.sql.MergeCursor.tempTable. Referenced by com.quadcap.sql.MergeCursor.next(). |
|
|
Once all of the column names are available, we can look for duplicates and shortest-unique names, etc.
Reimplemented from com.quadcap.sql.TupleImpl. Definition at line 105 of file MergeCursor.java. References com.quadcap.sql.MergeCursor.beforeFirst(), com.quadcap.sql.TupleImpl.getColumnCount(), and com.quadcap.sql.MergeCursor.row. Referenced by com.quadcap.sql.MergeExpression.getCursor(). |
|
|
If the underlying implementation knows, or can compute cheaply, the actual size of the ResultSet, it should return a non-negative number here.
If the size is unknown and it would be expensive to compute it (i.e., on the order of Implements com.quadcap.sql.Cursor. Definition at line 113 of file MergeCursor.java. References com.quadcap.sql.MergeCursor.bc, and com.quadcap.sql.MergeCursor.checkCursor(). |
|
|
Replace the current cursor row with the specified row.
Implements com.quadcap.sql.CursorImpl. Definition at line 146 of file MergeCursor.java. References com.quadcap.sql.MergeCursor.updateRow(). Referenced by com.quadcap.sql.MergeCursor.updateRow(). |
|
|
Definition at line 74 of file MergeCursor.java. Referenced by com.quadcap.sql.MergeCursor.MergeCursor(), com.quadcap.sql.MergeCursor.next(), com.quadcap.sql.MergeCursor.nextExcept(), and com.quadcap.sql.MergeCursor.nextIntersect(). |
|
|
|
Definition at line 78 of file MergeCursor.java. Referenced by com.quadcap.sql.MergeCursor.beforeFirst(), com.quadcap.sql.MergeCursor.nextExcept(), com.quadcap.sql.MergeCursor.nextIntersect(), and com.quadcap.sql.MergeCursor.nextUnionAll(). |
|
|
Definition at line 73 of file MergeCursor.java. Referenced by com.quadcap.sql.MergeCursor.MergeCursor(), and com.quadcap.sql.MergeCursor.next(). |
|
|