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
- SqlJetException
protected ISqlJetBtreeCursor getCursor()
protected SqlJetKeyInfo getKeyInfo()
public void pushState() throws SqlJetException
ISqlJetBtreeTable
pushState
in interface ISqlJetBtreeTable
SqlJetException
protected void adjustKeyInfo() throws SqlJetException
SqlJetException
public boolean popState() throws SqlJetException
ISqlJetBtreeTable
popState
in interface ISqlJetBtreeTable
SqlJetException
public void close() throws SqlJetException
ISqlJetBtreeTable
close
in interface ISqlJetBtreeTable
SqlJetException
public void unlock()
ISqlJetBtreeTable
unlock
in interface ISqlJetBtreeTable
public void lock() throws SqlJetException
ISqlJetBtreeTable
lock
in interface ISqlJetBtreeTable
SqlJetException
public boolean eof() throws SqlJetException
ISqlJetBtreeTable
eof
in interface ISqlJetBtreeTable
SqlJetException
public boolean hasMoved() throws SqlJetException
ISqlJetBtreeTable
hasMoved
in interface ISqlJetBtreeTable
SqlJetException
public boolean first() throws SqlJetException
ISqlJetBtreeTable
first
in interface ISqlJetBtreeTable
SqlJetException
public boolean last() throws SqlJetException
ISqlJetBtreeTable
last
in interface ISqlJetBtreeTable
SqlJetException
public boolean next() throws SqlJetException
ISqlJetBtreeTable
next
in interface ISqlJetBtreeTable
SqlJetException
public boolean previous() throws SqlJetException
ISqlJetBtreeTable
previous
in interface ISqlJetBtreeTable
SqlJetException
public ISqlJetBtreeRecord getRecord() throws SqlJetException
getRecord
in interface ISqlJetBtreeTable
SqlJetException
public void lockTable(boolean write)
lockTable
in interface ISqlJetBtreeTable
public SqlJetEncoding getEncoding() throws SqlJetException
getEncoding
in interface ISqlJetBtreeTable
SqlJetException
protected static boolean checkField(ISqlJetBtreeRecord record, int field) throws SqlJetException
SqlJetException
protected ISqlJetVdbeMem getValueMem(int field) throws SqlJetException
SqlJetException
public java.lang.Object getValue(int field) throws SqlJetException
ISqlJetBtreeTable
getValue
in interface ISqlJetBtreeTable
SqlJetException
public java.lang.Object getValueUncached(int field) throws SqlJetException
SqlJetException
public int getFieldsCount() throws SqlJetException
ISqlJetBtreeTable
getFieldsCount
in interface ISqlJetBtreeTable
SqlJetException
public boolean isNull(int field) throws SqlJetException
ISqlJetBtreeTable
isNull
in interface ISqlJetBtreeTable
field
- number of field begin from zeroSqlJetException
public java.lang.String getString(int field) throws SqlJetException
ISqlJetBtreeTable
getString
in interface ISqlJetBtreeTable
field
- number of field begin from zeroSqlJetException
public long getInteger(int field) throws SqlJetException
ISqlJetBtreeTable
getInteger
in interface ISqlJetBtreeTable
field
- number of field begin from zeroSqlJetException
public double getFloat(int field) throws SqlJetException
ISqlJetBtreeTable
getFloat
in interface ISqlJetBtreeTable
field
- number of field begin from zeroSqlJetException
public SqlJetValueType getFieldType(int field) throws SqlJetException
ISqlJetBtreeTable
getFieldType
in interface ISqlJetBtreeTable
field
- number of field begin from zeroSqlJetException
public ISqlJetMemoryPointer getBlob(int field) throws SqlJetException
ISqlJetBtreeTable
getBlob
in interface ISqlJetBtreeTable
field
- number of field begin from zeroSqlJetException
public java.lang.Object[] getValues() throws SqlJetException
ISqlJetBtreeTable
getValues
in interface ISqlJetBtreeTable
SqlJetException
public long newRowId() throws SqlJetException
newRowId
in interface ISqlJetBtreeTable
SqlJetException
public long newRowId(long prev) throws SqlJetException
newRowId
in interface ISqlJetBtreeTable
prev
- SqlJetException
protected void clearRecordCache()
public void clear() throws SqlJetException
clear
in interface ISqlJetBtreeTable
SqlJetException
public long getKeySize() throws SqlJetException
getKeySize
in interface ISqlJetBtreeTable
SqlJetException
public int moveTo(ISqlJetMemoryPointer pKey, long nKey, boolean bias) throws SqlJetException
moveTo
in interface ISqlJetBtreeTable
SqlJetException
public void insert(ISqlJetMemoryPointer pKey, long nKey, ISqlJetMemoryPointer pData, int nData, int nZero, boolean bias) throws SqlJetException
insert
in interface ISqlJetBtreeTable
object
- rowId
- pData
- remaining
- i
- b
- SqlJetException
public void delete() throws SqlJetException
delete
in interface ISqlJetBtreeTable
SqlJetException
Copyright © 2009-2010 TMate Software Ltd. All Rights Reserved.