public class SqlJetBtreeTable extends java.lang.Object implements ISqlJetBtreeTable
| Modifier and Type | Class and Description |
|---|---|
protected static class |
SqlJetBtreeTable.State |
| Modifier and Type | Field and Description |
|---|---|
protected ISqlJetBtree |
btree |
protected boolean |
index |
protected int |
rootPage |
protected boolean |
write |
| Constructor and Description |
|---|
SqlJetBtreeTable(ISqlJetBtree btree,
int rootPage,
boolean write,
boolean index) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
adjustKeyInfo() |
protected static boolean |
checkField(ISqlJetBtreeRecord record,
int field) |
void |
clear() |
protected void |
clearRecordCache() |
void |
close()
Close B-Tree table cursor.
|
void |
delete() |
boolean |
eof()
Check of end of B-Tree table cursor.
|
boolean |
first()
Go to first record.
|
ISqlJetMemoryPointer |
getBlob(int field)
Get field's value as BLOB.
|
protected ISqlJetBtreeCursor |
getCursor() |
SqlJetEncoding |
getEncoding() |
int |
getFieldsCount()
Get count of fields in current record.
|
SqlJetValueType |
getFieldType(int field)
Get type of field.
|
double |
getFloat(int field)
Get field's value as real (float).
|
long |
getInteger(int field)
Get field's value as integer.
|
protected SqlJetKeyInfo |
getKeyInfo() |
long |
getKeySize() |
ISqlJetBtreeRecord |
getRecord() |
java.lang.String |
getString(int field)
Get field's value as string.
|
java.lang.Object |
getValue(int field)
Get value as object.
|
protected ISqlJetVdbeMem |
getValueMem(int field) |
java.lang.Object[] |
getValues()
Get values as objects.
|
java.lang.Object |
getValueUncached(int field) |
boolean |
hasMoved()
Returns true if cursor has been moved.
|
void |
insert(ISqlJetMemoryPointer pKey,
long nKey,
ISqlJetMemoryPointer pData,
int nData,
int nZero,
boolean bias) |
boolean |
isNull(int field)
Check to field has null value.
|
boolean |
last()
Go to last record.
|
void |
lock()
Lock B-Tree table cursor's mutex.
|
void |
lockTable(boolean write) |
int |
moveTo(ISqlJetMemoryPointer pKey,
long nKey,
boolean bias) |
long |
newRowId() |
long |
newRowId(long prev)
Get a new integer record number (a.k.a "rowid") used as the key to a
table.
|
boolean |
next()
Go to next record.
|
boolean |
popState()
Restores previously saved state if there any.
|
boolean |
previous()
Go to previous record.
|
void |
pushState()
Saves current state of this table and sets it
to point to the first record.
|
void |
unlock()
Unlock B-Tree table cursror's mutex.
|
protected ISqlJetBtree btree
protected int rootPage
protected boolean write
protected boolean index
public SqlJetBtreeTable(ISqlJetBtree btree, int rootPage, boolean write, boolean index) throws SqlJetException
db - btree - rootPage - write - index - SqlJetExceptionprotected ISqlJetBtreeCursor getCursor()
protected SqlJetKeyInfo getKeyInfo()
public void pushState()
throws SqlJetException
ISqlJetBtreeTablepushState in interface ISqlJetBtreeTableSqlJetExceptionprotected void adjustKeyInfo()
throws SqlJetException
SqlJetExceptionpublic boolean popState()
throws SqlJetException
ISqlJetBtreeTablepopState in interface ISqlJetBtreeTableSqlJetExceptionpublic void close()
throws SqlJetException
ISqlJetBtreeTableclose in interface ISqlJetBtreeTableSqlJetExceptionpublic void unlock()
ISqlJetBtreeTableunlock in interface ISqlJetBtreeTablepublic void lock()
throws SqlJetException
ISqlJetBtreeTablelock in interface ISqlJetBtreeTableSqlJetExceptionpublic boolean eof()
throws SqlJetException
ISqlJetBtreeTableeof in interface ISqlJetBtreeTableSqlJetExceptionpublic boolean hasMoved()
throws SqlJetException
ISqlJetBtreeTablehasMoved in interface ISqlJetBtreeTableSqlJetExceptionpublic boolean first()
throws SqlJetException
ISqlJetBtreeTablefirst in interface ISqlJetBtreeTableSqlJetExceptionpublic boolean last()
throws SqlJetException
ISqlJetBtreeTablelast in interface ISqlJetBtreeTableSqlJetExceptionpublic boolean next()
throws SqlJetException
ISqlJetBtreeTablenext in interface ISqlJetBtreeTableSqlJetExceptionpublic boolean previous()
throws SqlJetException
ISqlJetBtreeTableprevious in interface ISqlJetBtreeTableSqlJetExceptionpublic ISqlJetBtreeRecord getRecord() throws SqlJetException
getRecord in interface ISqlJetBtreeTableSqlJetExceptionpublic void lockTable(boolean write)
lockTable in interface ISqlJetBtreeTablepublic SqlJetEncoding getEncoding() throws SqlJetException
getEncoding in interface ISqlJetBtreeTableSqlJetExceptionprotected static boolean checkField(ISqlJetBtreeRecord record, int field) throws SqlJetException
SqlJetExceptionprotected ISqlJetVdbeMem getValueMem(int field) throws SqlJetException
SqlJetExceptionpublic java.lang.Object getValue(int field)
throws SqlJetException
ISqlJetBtreeTablegetValue in interface ISqlJetBtreeTableSqlJetExceptionpublic java.lang.Object getValueUncached(int field)
throws SqlJetException
SqlJetExceptionpublic int getFieldsCount()
throws SqlJetException
ISqlJetBtreeTablegetFieldsCount in interface ISqlJetBtreeTableSqlJetExceptionpublic boolean isNull(int field)
throws SqlJetException
ISqlJetBtreeTableisNull in interface ISqlJetBtreeTablefield - number of field begin from zeroSqlJetExceptionpublic java.lang.String getString(int field)
throws SqlJetException
ISqlJetBtreeTablegetString in interface ISqlJetBtreeTablefield - number of field begin from zeroSqlJetExceptionpublic long getInteger(int field)
throws SqlJetException
ISqlJetBtreeTablegetInteger in interface ISqlJetBtreeTablefield - number of field begin from zeroSqlJetExceptionpublic double getFloat(int field)
throws SqlJetException
ISqlJetBtreeTablegetFloat in interface ISqlJetBtreeTablefield - number of field begin from zeroSqlJetExceptionpublic SqlJetValueType getFieldType(int field) throws SqlJetException
ISqlJetBtreeTablegetFieldType in interface ISqlJetBtreeTablefield - number of field begin from zeroSqlJetExceptionpublic ISqlJetMemoryPointer getBlob(int field) throws SqlJetException
ISqlJetBtreeTablegetBlob in interface ISqlJetBtreeTablefield - number of field begin from zeroSqlJetExceptionpublic java.lang.Object[] getValues()
throws SqlJetException
ISqlJetBtreeTablegetValues in interface ISqlJetBtreeTableSqlJetExceptionpublic long newRowId()
throws SqlJetException
newRowId in interface ISqlJetBtreeTableSqlJetExceptionpublic long newRowId(long prev)
throws SqlJetException
newRowId in interface ISqlJetBtreeTableprev - SqlJetExceptionprotected void clearRecordCache()
public void clear()
throws SqlJetException
clear in interface ISqlJetBtreeTableSqlJetExceptionpublic long getKeySize()
throws SqlJetException
getKeySize in interface ISqlJetBtreeTableSqlJetExceptionpublic int moveTo(ISqlJetMemoryPointer pKey, long nKey, boolean bias) throws SqlJetException
moveTo in interface ISqlJetBtreeTableSqlJetExceptionpublic void insert(ISqlJetMemoryPointer pKey, long nKey, ISqlJetMemoryPointer pData, int nData, int nZero, boolean bias) throws SqlJetException
insert in interface ISqlJetBtreeTableobject - rowId - pData - remaining - i - b - SqlJetExceptionpublic void delete()
throws SqlJetException
delete in interface ISqlJetBtreeTableSqlJetException