|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.tmatesoft.sqljet.core.internal.SqlJetCloneable
org.tmatesoft.sqljet.core.internal.btree.SqlJetBtreeCursor
public class SqlJetBtreeCursor
| Field Summary |
|---|
| Fields inherited from interface org.tmatesoft.sqljet.core.internal.ISqlJetBtreeCursor |
|---|
BTCURSOR_MAX_DEPTH |
| Constructor Summary | |
|---|---|
SqlJetBtreeCursor(SqlJetBtree btree,
int table,
boolean wrFlag,
ISqlJetKeyInfo keyInfo)
Create a new cursor for the BTree whose root is on the page iTable. |
|
| Method Summary | |
|---|---|
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[] amt)
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 zero,
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[] amt)
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 pIdxKey,
long intKey,
boolean biasRight)
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. |
| Methods inherited from class org.tmatesoft.sqljet.core.internal.SqlJetCloneable |
|---|
clone |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SqlJetBtreeCursor(SqlJetBtree btree,
int table,
boolean wrFlag,
ISqlJetKeyInfo keyInfo)
throws SqlJetException
sqlJetBtree - table - wrFlag2 - keyInfo -
SqlJetException| Method Detail |
|---|
public void clearCursor()
ISqlJetBtreeCursor
clearCursor in interface ISqlJetBtreeCursor
public void closeCursor()
throws SqlJetException
ISqlJetBtreeCursor
closeCursor in interface ISqlJetBtreeCursorSqlJetException
public int moveTo(ISqlJetMemoryPointer pKey,
long nKey,
boolean bias)
throws SqlJetException
ISqlJetBtreeCursor
moveTo in interface ISqlJetBtreeCursorpKey - Packed key if the btree is an indexnKey - Integer key for tables. Size of pKey for indicesbias - Bias search to the high end
SqlJetException
public int moveToUnpacked(ISqlJetUnpackedRecord pIdxKey,
long intKey,
boolean biasRight)
throws SqlJetException
ISqlJetBtreeCursor
moveToUnpacked in interface ISqlJetBtreeCursorSqlJetException
public void restoreCursorPosition()
throws SqlJetException
restoreCursorPosition in interface ISqlJetBtreeCursorSqlJetExceptionpublic boolean cursorHasMoved()
ISqlJetBtreeCursor
cursorHasMoved in interface ISqlJetBtreeCursor
public void delete()
throws SqlJetException
ISqlJetBtreeCursor
delete in interface ISqlJetBtreeCursorSqlJetException
public void insert(ISqlJetMemoryPointer pKey,
long nKey,
ISqlJetMemoryPointer pData,
int nData,
int zero,
boolean bias)
throws SqlJetException
ISqlJetBtreeCursor
insert in interface ISqlJetBtreeCursorpKey - The key of the new recordnKey - The key of the new recordpData - The data of the new recordnData - The data of the new recordzero - Number of extra 0 bytes to append to databias - True if this is likely an append
SqlJetException
public boolean first()
throws SqlJetException
ISqlJetBtreeCursor
first in interface ISqlJetBtreeCursorSqlJetException
public boolean last()
throws SqlJetException
ISqlJetBtreeCursor
last in interface ISqlJetBtreeCursorSqlJetException
public boolean next()
throws SqlJetException
ISqlJetBtreeCursor
next in interface ISqlJetBtreeCursorSqlJetException
public boolean previous()
throws SqlJetException
ISqlJetBtreeCursor
previous in interface ISqlJetBtreeCursorSqlJetExceptionpublic boolean eof()
ISqlJetBtreeCursor
eof in interface ISqlJetBtreeCursor
public short flags()
throws SqlJetException
ISqlJetBtreeCursor
flags in interface ISqlJetBtreeCursorSqlJetException
public long getKeySize()
throws SqlJetException
ISqlJetBtreeCursor
getKeySize in interface ISqlJetBtreeCursorSqlJetException
public void key(int offset,
int amt,
ISqlJetMemoryPointer buf)
throws SqlJetException
ISqlJetBtreeCursor
key in interface ISqlJetBtreeCursorSqlJetExceptionpublic ISqlJetDbHandle getCursorDb()
ISqlJetBtreeCursor
getCursorDb in interface ISqlJetBtreeCursorpublic ISqlJetMemoryPointer keyFetch(int[] amt)
ISqlJetBtreeCursor
keyFetch in interface ISqlJetBtreeCursorpublic ISqlJetMemoryPointer dataFetch(int[] amt)
ISqlJetBtreeCursor
dataFetch in interface ISqlJetBtreeCursor
public int getDataSize()
throws SqlJetException
ISqlJetBtreeCursor
getDataSize in interface ISqlJetBtreeCursorSqlJetException
public void data(int offset,
int amt,
ISqlJetMemoryPointer buf)
throws SqlJetException
ISqlJetBtreeCursor
data in interface ISqlJetBtreeCursorSqlJetException
public void putData(int offset,
int amt,
ISqlJetMemoryPointer data)
throws SqlJetException
ISqlJetBtreeCursor
putData in interface ISqlJetBtreeCursorSqlJetExceptionpublic void cacheOverflow()
ISqlJetBtreeCursor
cacheOverflow in interface ISqlJetBtreeCursor
public boolean saveCursorPosition()
throws SqlJetException
saveCursorPosition in interface ISqlJetBtreeCursorSqlJetExceptionpublic void enterCursor()
ISqlJetBtreeCursor
enterCursor in interface ISqlJetBtreeCursorpublic void leaveCursor()
ISqlJetBtreeCursor
leaveCursor in interface ISqlJetBtreeCursor
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||