public interface ISqlJetBtreeCursor
Modifier and Type | Field and Description |
---|---|
static int |
BTCURSOR_MAX_DEPTH
Maximum depth of an SQLite B-Tree structure.
|
Modifier and Type | Method and Description |
---|---|
void |
cacheOverflow()
Set a flag on this cursor to cache the locations of pages from the
overflow list for the current row.
|
void |
clearCursor()
Clear the current cursor position.
|
void |
closeCursor()
Close a cursor.
|
boolean |
cursorHasMoved()
Determine whether or not a cursor has moved from the position it
was last placed at.
|
void |
data(int offset,
int amt,
ISqlJetMemoryPointer buf)
Read part of the data associated with cursor pCur.
|
ISqlJetMemoryPointer |
dataFetch(int[] pAmt)
For the entry that cursor pCur is point to, return as
many bytes of the key or data as are available on the local
b-tree page.
|
void |
delete()
Delete the entry that the cursor is pointing to.
|
void |
enterCursor()
Enter a mutex on a Btree given a cursor owned by that
Btree.
|
boolean |
eof()
Return TRUE if the cursor is not pointing at an entry of the table.
|
boolean |
first()
Move the cursor to the first entry in the table.
|
short |
flags()
Return the flag byte at the beginning of the page that the cursor
is currently pointing to.
|
ISqlJetDbHandle |
getCursorDb()
Return the database connection handle for a cursor.
|
int |
getDataSize()
Return the number of bytes of data in the entry the
cursor currently points to.
|
long |
getKeySize()
Returns the size of the buffer needed to hold the value of
the key for the current entry.
|
void |
insert(ISqlJetMemoryPointer pKey,
long nKey,
ISqlJetMemoryPointer pData,
int nData,
int nZero,
boolean bias)
Insert a new record into the BTree.
|
void |
key(int offset,
int amt,
ISqlJetMemoryPointer buf)
Read part of the key associated with cursor pCur.
|
ISqlJetMemoryPointer |
keyFetch(int[] pAmt)
For the entry that cursor pCur is point to, return as
many bytes of the key or data as are available on the local
b-tree page.
|
boolean |
last()
Move the cursor to the last entry in the table.
|
void |
leaveCursor()
Leave a mutex on a Btree given a cursor owned by that
Btree.
|
int |
moveTo(ISqlJetMemoryPointer pKey,
long nKey,
boolean bias)
In this version of moveTo(), pKey is a packed index record
such as is generated by the OP_MakeRecord opcode.
|
int |
moveToUnpacked(ISqlJetUnpackedRecord pUnKey,
long intKey,
boolean bias)
Move the cursor so that it points to an entry near the key
specified by pIdxKey or intKey.
|
boolean |
next()
Advance the cursor to the next entry in the database.
|
boolean |
previous()
Step the cursor to the back to the previous entry in the database.
|
void |
putData(int offset,
int amt,
ISqlJetMemoryPointer data)
Must be a cursor opened for writing on an
INTKEY table currently pointing at a valid table entry.
|
void |
restoreCursorPosition()
Restore the cursor to the position it was in (or as close to as possible)
when saveCursorPosition() was called.
|
boolean |
saveCursorPosition()
Save the current cursor position in the variables BtCursor.nKey and
BtCursor.pKey.
|
static final int BTCURSOR_MAX_DEPTH
void closeCursor() throws SqlJetException
SqlJetException
int moveTo(ISqlJetMemoryPointer pKey, long nKey, boolean bias) throws SqlJetException
pKey
- Packed key if the btree is an indexnKey
- Integer key for tables. Size of pKey for indicesbias
- Bias search to the high endSqlJetException
int moveToUnpacked(ISqlJetUnpackedRecord pUnKey, long intKey, boolean bias) throws SqlJetException
SqlJetException
boolean cursorHasMoved() throws SqlJetException
SqlJetException
void delete() throws SqlJetException
SqlJetException
void insert(ISqlJetMemoryPointer pKey, long nKey, ISqlJetMemoryPointer pData, int nData, int nZero, boolean bias) throws SqlJetException
pKey
- The key of the new recordnKey
- The key of the new recordpData
- The data of the new recordnData
- The data of the new recordnZero
- Number of extra 0 bytes to append to databias
- True if this is likely an appendSqlJetException
boolean first() throws SqlJetException
SqlJetException
boolean last() throws SqlJetException
SqlJetException
boolean next() throws SqlJetException
SqlJetException
boolean eof()
SqlJetException
short flags() throws SqlJetException
SqlJetException
boolean previous() throws SqlJetException
SqlJetException
long getKeySize() throws SqlJetException
SqlJetException
void key(int offset, int amt, ISqlJetMemoryPointer buf) throws SqlJetException
SqlJetException
ISqlJetDbHandle getCursorDb() throws SqlJetException
SqlJetException
ISqlJetMemoryPointer keyFetch(int[] pAmt) throws SqlJetException
SqlJetException
ISqlJetMemoryPointer dataFetch(int[] pAmt) throws SqlJetException
SqlJetException
int getDataSize() throws SqlJetException
SqlJetException
void data(int offset, int amt, ISqlJetMemoryPointer buf) throws SqlJetException
offset
- amt
- buf
- SqlJetException
void putData(int offset, int amt, ISqlJetMemoryPointer data) throws SqlJetException
offset
- amt
- data
- SqlJetException
void cacheOverflow() throws SqlJetException
SqlJetException
void clearCursor() throws SqlJetException
SqlJetException
void enterCursor()
void leaveCursor()
boolean saveCursorPosition() throws SqlJetException
SqlJetException
void restoreCursorPosition() throws SqlJetException
SqlJetException
Copyright © 2009-2010 TMate Software Ltd. All Rights Reserved.