Class SqlJetBtreeIndexTable
java.lang.Object
org.tmatesoft.sqljet.core.internal.table.SqlJetBtreeTable
org.tmatesoft.sqljet.core.internal.table.SqlJetBtreeIndexTable
- All Implemented Interfaces:
ISqlJetBtreeIndexTable
,ISqlJetBtreeTable
-
Nested Class Summary
Nested classes/interfaces inherited from class org.tmatesoft.sqljet.core.internal.table.SqlJetBtreeTable
SqlJetBtreeTable.State
-
Field Summary
Fields inherited from class org.tmatesoft.sqljet.core.internal.table.SqlJetBtreeTable
btree, index, rootPage, write
-
Constructor Summary
ConstructorsConstructorDescriptionSqlJetBtreeIndexTable
(ISqlJetBtree btree, String indexName, boolean write) Open index by nameSqlJetBtreeIndexTable
(ISqlJetBtree btree, String indexName, List<String> columns, boolean write) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
boolean
Check current record against key.int
compareKey
(Object[] key) int
compareKeys
(Object[] firstKey, Object[] lastKey) boolean
Delete entry which matches to key and point to given rowId.long
void
Writes key into the index.long
Lookup index entry by key values.long
lookupLastNear
(Object[] key) long
lookupNear
(boolean next, Object[] key) void
reindex
(ISqlJetSchema schema) Methods inherited from class org.tmatesoft.sqljet.core.internal.table.SqlJetBtreeTable
checkField, clear, clearRecordCache, close, delete, eof, first, getBlob, getCursor, getEncoding, getFieldsCount, getFieldType, getFloat, getInteger, getKeyInfo, getKeySize, getRecord, getString, getValue, getValueMem, getValues, getValueUncached, hasMoved, insert, isNull, last, lock, lockTable, moveTo, newRowId, newRowId, next, popState, previous, pushState, unlock
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.tmatesoft.sqljet.core.internal.table.ISqlJetBtreeTable
clear, close, delete, eof, first, getBlob, getEncoding, getFieldsCount, getFieldType, getFloat, getInteger, getKeySize, getRecord, getString, getValue, getValues, hasMoved, insert, isNull, last, lock, lockTable, moveTo, newRowId, newRowId, next, popState, previous, pushState, unlock
-
Constructor Details
-
SqlJetBtreeIndexTable
public SqlJetBtreeIndexTable(ISqlJetBtree btree, String indexName, boolean write) throws SqlJetException Open index by name- Throws:
SqlJetException
-
SqlJetBtreeIndexTable
public SqlJetBtreeIndexTable(ISqlJetBtree btree, String indexName, List<String> columns, boolean write) throws SqlJetException - Throws:
SqlJetException
-
-
Method Details
-
getIndexDef
- Returns:
- the indexDef
-
lookup
Description copied from interface:ISqlJetBtreeIndexTable
Lookup index entry by key values. If 'next' is true then just check next entry in index.- Specified by:
lookup
in interfaceISqlJetBtreeIndexTable
- Parameters:
next
- just check next index entryvalues
- the key values- Returns:
- Throws:
SqlJetException
-
compareKeys
- Specified by:
compareKeys
in interfaceISqlJetBtreeIndexTable
- Parameters:
firstKey
-lastKey
-- Returns:
- Throws:
SqlJetException
-
checkKey
Description copied from interface:ISqlJetBtreeIndexTable
Check current record against key.- Specified by:
checkKey
in interfaceISqlJetBtreeIndexTable
- Parameters:
key
-- Returns:
- Throws:
SqlJetException
-
adjustKeyInfo
- Overrides:
adjustKeyInfo
in classSqlJetBtreeTable
- Parameters:
key
-- Throws:
SqlJetException
-
insert
Description copied from interface:ISqlJetBtreeIndexTable
Writes key into the index. Data for the entry is nil. Append flag that provides a hint to the b-tree layer that this insert is likely to be an append.- Specified by:
insert
in interfaceISqlJetBtreeIndexTable
- Parameters:
rowId
-append
-key
-- Throws:
SqlJetException
-
delete
Description copied from interface:ISqlJetBtreeIndexTable
Delete entry which matches to key and point to given rowId.- Specified by:
delete
in interfaceISqlJetBtreeIndexTable
- Parameters:
rowId
-key
-- Returns:
- true if there was deleted entry which matches to key.
- Throws:
SqlJetException
-
getKeyRowId
- Specified by:
getKeyRowId
in interfaceISqlJetBtreeIndexTable
- Throws:
SqlJetException
-
reindex
- Throws:
SqlJetException
-
compareKey
- Specified by:
compareKey
in interfaceISqlJetBtreeIndexTable
- Parameters:
key
-- Returns:
- Throws:
SqlJetException
-
lookupNear
- Specified by:
lookupNear
in interfaceISqlJetBtreeIndexTable
- Parameters:
key
-- Returns:
- Throws:
SqlJetException
-
lookupLastNear
- Specified by:
lookupLastNear
in interfaceISqlJetBtreeIndexTable
- Parameters:
key
-- Returns:
- Throws:
SqlJetException
-