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

The temp table that we build has keys based on the union columns, and the data as 13 bytes:
| byte 0: | if zero, the rowId refers to a real table row if one, the rowId refers to a temp row |
| bytes 1-8: | the rowId of the union row |
| bytes 9-12: | the duplicate count (from table 1) |
| bytes 13-16: | the duplicate count (from table 2) |
Definition at line 74 of file TempTableMerge.java.
Public Member Functions | |
| TempTableMerge (Session session, Key compare) throws SQLException, IOException | |
| Constructor for session and key. | |
| void | addRows (Session session, Cursor cursor, int side, int[] map) throws SQLException, IOException |
| Add rows from one side of the {union/merge} operation, building a temporary index on the key. | |
| byte[] | getData (byte[] key) throws IOException |
Package Functions | |
| final int | getCount (int side) |
Static Package Functions | |
| final int | getCount (byte[] data, int side) |
Static Package Attributes | |
| final int | fIS_TEMP = 0 |
| Byte offset of 'isTemp' byte flag in a data row. | |
| final int | fROW_ID = 1 |
| The byte offset of the (long) row ID in data data row. | |
| final int | fCOUNT = 9 |
| The byte offset of the two 'count' integers. | |
| final int | BUFSIZE = 17 |
| Total size of the data buffer in our temp index. | |
|
||||||||||||
|
Constructor for session and key.
Definition at line 99 of file TempTableMerge.java. References com.quadcap.sql.TempTableMerge.BUFSIZE. |
|
||||||||||||||||||||
|
Add rows from one side of the {union/merge} operation, building a temporary index on the key.
Definition at line 110 of file TempTableMerge.java. References com.quadcap.sql.TempTableMerge.addRows(), com.quadcap.sql.TempTableMerge.BUFSIZE, com.quadcap.sql.TempTableMerge.fCOUNT, com.quadcap.sql.TempTableMerge.fIS_TEMP, com.quadcap.sql.TempTableMerge.fROW_ID, com.quadcap.sql.index.Btree.getCursor(), com.quadcap.sql.Session.getDatabase(), com.quadcap.sql.index.BCursor.getValBuf(), com.quadcap.sql.index.BCursor.insert(), com.quadcap.sql.Database.putRow(), com.quadcap.sql.index.BCursor.release(), com.quadcap.sql.index.BCursor.replace(), com.quadcap.sql.index.BCursor.seek(), and com.quadcap.sql.MapRow.setRow(). Referenced by com.quadcap.sql.TempTableMerge.addRows(), and com.quadcap.sql.MergeExpression.getCursor(). |
|
||||||||||||
|
Definition at line 176 of file TempTableMerge.java. References com.quadcap.sql.TempTableMerge.fCOUNT. |
|
|
Definition at line 172 of file TempTableMerge.java. References com.quadcap.sql.TempTableMerge.getCount(). Referenced by com.quadcap.sql.TempTableMerge.getCount(). |
|
|
Definition at line 165 of file TempTableMerge.java. References com.quadcap.sql.index.Btree.get(), and com.quadcap.sql.TempTableMerge.getData(). Referenced by com.quadcap.sql.TempTableMerge.getData(). |
|
|
Total size of the data buffer in our temp index.
Definition at line 94 of file TempTableMerge.java. Referenced by com.quadcap.sql.TempTableMerge.addRows(), and com.quadcap.sql.TempTableMerge.TempTableMerge(). |
|
|
The byte offset of the two 'count' integers. in the data row Definition at line 89 of file TempTableMerge.java. Referenced by com.quadcap.sql.TempTableMerge.addRows(), and com.quadcap.sql.TempTableMerge.getCount(). |
|
|
Byte offset of 'isTemp' byte flag in a data row.
Definition at line 79 of file TempTableMerge.java. Referenced by com.quadcap.sql.TempTableMerge.addRows(). |
|
|
The byte offset of the (long) row ID in data data row.
Definition at line 84 of file TempTableMerge.java. Referenced by com.quadcap.sql.TempTableMerge.addRows(). |