public class SqlJetBtreeDataTable extends SqlJetBtreeTable implements ISqlJetBtreeDataTable
SqlJetBtreeTable.State
btree, index, rootPage, write
Constructor and Description |
---|
SqlJetBtreeDataTable(ISqlJetBtree btree,
java.lang.String tableName,
boolean write)
Open data table by name.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkIndex(java.lang.String indexName,
java.lang.Object[] key)
Check the current record is equal to key using definition of index.
|
void |
clear() |
void |
close()
Close B-Tree table cursor.
|
void |
delete()
Delete curent record.
|
void |
delete(long rowId)
Delete record by row's ID.
|
ISqlJetTableDef |
getDefinition()
Get table's schema definition.
|
ISqlJetBtreeIndexTable |
getIndex(java.lang.String indexName) |
java.util.Map<java.lang.String,ISqlJetIndexDef> |
getIndexDefinitions()
Get definitions of table's indexes.
|
java.util.Map<java.lang.String,ISqlJetBtreeIndexTable> |
getIndexesTables()
Get indexes which are related with table.
|
long |
getInteger(int field)
Get field's value as integer.
|
java.lang.Object[] |
getKeyForIndex(java.lang.Object[] fields,
ISqlJetIndexDef indexDef) |
java.lang.String |
getPrimaryKeyIndex()
Get name of index which has been auto-created for primary key.
|
long |
getRowId()
Get current rowID.
|
static long |
getRowIdFromValues(java.util.Map<java.lang.String,java.lang.Object> values) |
java.lang.Object |
getValue(int field)
Get value as object.
|
protected ISqlJetVdbeMem |
getValueMem(int field) |
boolean |
goToRow(long rowId)
Go to record with given rowID.
|
long |
insert(SqlJetConflictAction onConflict,
java.util.Map<java.lang.String,java.lang.Object> values)
Insert record by values by names of fields.
|
long |
insert(SqlJetConflictAction onConflict,
java.lang.Object... values)
Write an new entry into the table.
|
long |
insertWithRowId(SqlJetConflictAction onConflict,
long rowId,
java.lang.Object[] values) |
static boolean |
isFieldNameRowId(java.lang.String fieldName) |
boolean |
isIndexExists(java.lang.String indexName) |
boolean |
isNull(int field)
Check to field has null value.
|
boolean |
locate(java.lang.String indexName,
boolean next,
java.lang.Object... key)
Locate record which using index by key.
|
long |
newRowId() |
void |
update(SqlJetConflictAction onConflict,
long rowId,
java.util.Map<java.lang.String,java.lang.Object> values) |
void |
update(SqlJetConflictAction onConflict,
long rowId,
java.lang.Object... values)
Update an entry in the table by rowId.
|
void |
update(SqlJetConflictAction onConflict,
java.util.Map<java.lang.String,java.lang.Object> values) |
void |
updateCurrent(SqlJetConflictAction onConflict,
java.lang.Object... values)
Update the current entry in the table.
|
long |
updateCurrentWithRowId(SqlJetConflictAction onConflict,
long newRowId,
java.lang.Object... values)
Update the rowId and values in current entry in the table.
|
long |
updateWithRowId(SqlJetConflictAction onConflict,
long rowId,
long newRowId,
java.lang.Object... values)
Update the rowId and values an entry in the table by rowId.
|
adjustKeyInfo, checkField, clearRecordCache, eof, first, getBlob, getCursor, getEncoding, getFieldsCount, getFieldType, getFloat, getKeyInfo, getKeySize, getRecord, getString, getValues, getValueUncached, hasMoved, insert, last, lock, lockTable, moveTo, newRowId, next, popState, previous, pushState, unlock
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
eof, first, getBlob, getEncoding, getFieldsCount, getFieldType, getFloat, getKeySize, getRecord, getString, getValues, hasMoved, insert, last, lock, lockTable, moveTo, newRowId, next, popState, previous, pushState, unlock
public SqlJetBtreeDataTable(ISqlJetBtree btree, java.lang.String tableName, boolean write) throws SqlJetException
SqlJetException
public void close() throws SqlJetException
ISqlJetBtreeTable
close
in interface ISqlJetBtreeTable
close
in class SqlJetBtreeTable
SqlJetException
public ISqlJetTableDef getDefinition()
ISqlJetBtreeDataTable
getDefinition
in interface ISqlJetBtreeDataTable
public java.util.Map<java.lang.String,ISqlJetIndexDef> getIndexDefinitions()
ISqlJetBtreeDataTable
getIndexDefinitions
in interface ISqlJetBtreeDataTable
public boolean goToRow(long rowId) throws SqlJetException
ISqlJetBtreeDataTable
goToRow
in interface ISqlJetBtreeDataTable
SqlJetException
public long getRowId() throws SqlJetException
ISqlJetBtreeDataTable
getRowId
in interface ISqlJetBtreeDataTable
SqlJetException
public long insert(SqlJetConflictAction onConflict, java.lang.Object... values) throws SqlJetException
ISqlJetBtreeDataTable
insert
in interface ISqlJetBtreeDataTable
SqlJetException
public long insertWithRowId(SqlJetConflictAction onConflict, long rowId, java.lang.Object[] values) throws SqlJetException
insertWithRowId
in interface ISqlJetBtreeDataTable
SqlJetException
public long newRowId() throws SqlJetException
newRowId
in interface ISqlJetBtreeTable
newRowId
in class SqlJetBtreeTable
SqlJetException
public void update(SqlJetConflictAction onConflict, long rowId, java.lang.Object... values) throws SqlJetException
ISqlJetBtreeDataTable
update
in interface ISqlJetBtreeDataTable
SqlJetException
public void updateCurrent(SqlJetConflictAction onConflict, java.lang.Object... values) throws SqlJetException
ISqlJetBtreeDataTable
updateCurrent
in interface ISqlJetBtreeDataTable
SqlJetException
public long updateWithRowId(SqlJetConflictAction onConflict, long rowId, long newRowId, java.lang.Object... values) throws SqlJetException
ISqlJetBtreeDataTable
updateWithRowId
in interface ISqlJetBtreeDataTable
SqlJetException
public long updateCurrentWithRowId(SqlJetConflictAction onConflict, long newRowId, java.lang.Object... values) throws SqlJetException
ISqlJetBtreeDataTable
updateCurrentWithRowId
in interface ISqlJetBtreeDataTable
SqlJetException
public void delete(long rowId) throws SqlJetException
ISqlJetBtreeDataTable
delete
in interface ISqlJetBtreeDataTable
SqlJetException
public void delete() throws SqlJetException
ISqlJetBtreeDataTable
delete
in interface ISqlJetBtreeDataTable
delete
in interface ISqlJetBtreeTable
delete
in class SqlJetBtreeTable
SqlJetException
public java.lang.Object[] getKeyForIndex(java.lang.Object[] fields, ISqlJetIndexDef indexDef)
public boolean checkIndex(java.lang.String indexName, java.lang.Object[] key) throws SqlJetException
ISqlJetBtreeDataTable
checkIndex
in interface ISqlJetBtreeDataTable
SqlJetException
public java.lang.String getPrimaryKeyIndex()
ISqlJetBtreeDataTable
getPrimaryKeyIndex
in interface ISqlJetBtreeDataTable
public boolean locate(java.lang.String indexName, boolean next, java.lang.Object... key) throws SqlJetException
ISqlJetBtreeDataTable
locate
in interface ISqlJetBtreeDataTable
SqlJetException
public java.util.Map<java.lang.String,ISqlJetBtreeIndexTable> getIndexesTables()
ISqlJetBtreeDataTable
getIndexesTables
in interface ISqlJetBtreeDataTable
public long insert(SqlJetConflictAction onConflict, java.util.Map<java.lang.String,java.lang.Object> values) throws SqlJetException
ISqlJetBtreeDataTable
insert
in interface ISqlJetBtreeDataTable
SqlJetException
public void update(SqlJetConflictAction onConflict, long rowId, java.util.Map<java.lang.String,java.lang.Object> values) throws SqlJetException
update
in interface ISqlJetBtreeDataTable
SqlJetException
public void update(SqlJetConflictAction onConflict, java.util.Map<java.lang.String,java.lang.Object> values) throws SqlJetException
update
in interface ISqlJetBtreeDataTable
SqlJetException
public long getInteger(int field) throws SqlJetException
ISqlJetBtreeTable
getInteger
in interface ISqlJetBtreeTable
getInteger
in class SqlJetBtreeTable
field
- number of field begin from zeroSqlJetException
public java.lang.Object getValue(int field) throws SqlJetException
ISqlJetBtreeTable
getValue
in interface ISqlJetBtreeTable
getValue
in class SqlJetBtreeTable
SqlJetException
public boolean isIndexExists(java.lang.String indexName)
isIndexExists
in interface ISqlJetBtreeDataTable
public static boolean isFieldNameRowId(java.lang.String fieldName)
public static long getRowIdFromValues(java.util.Map<java.lang.String,java.lang.Object> values) throws SqlJetException
SqlJetException
public void clear() throws SqlJetException
clear
in interface ISqlJetBtreeTable
clear
in class SqlJetBtreeTable
SqlJetException
protected ISqlJetVdbeMem getValueMem(int field) throws SqlJetException
getValueMem
in class SqlJetBtreeTable
SqlJetException
public ISqlJetBtreeIndexTable getIndex(java.lang.String indexName)
getIndex
in interface ISqlJetBtreeDataTable
public boolean isNull(int field) throws SqlJetException
ISqlJetBtreeTable
isNull
in interface ISqlJetBtreeTable
isNull
in class SqlJetBtreeTable
field
- number of field begin from zeroSqlJetException
Copyright © 2009-2010 TMate Software Ltd. All Rights Reserved.