This is the most common type of index, a b tree index.
Only the data of the indexed columns are stored in the index.
| Methods |
| static boolean |
isMemoryChangeRequired()
Check if calculating the memory is required.
|
| static boolean |
isMemoryChangeRequired()
Check if calculating the memory is required.
Returns:
true if it is
|
| void |
add(Session session, Row row)
|
| void |
add(Session session, Row row)
|
| boolean |
canFindNext()
|
| boolean |
canFindNext()
|
| boolean |
canGetFirstOrLast()
|
| boolean |
canGetFirstOrLast()
|
| void |
checkRename()
|
| void |
checkRename()
|
| void |
close(Session session)
|
| void |
close(Session session)
|
| Cursor |
find(Session session, SearchRow first, SearchRow last)
|
| Cursor |
find(Session session, SearchRow first, SearchRow last)
|
| Cursor |
findFirstOrLast(Session session, boolean first)
|
| Cursor |
findFirstOrLast(Session session, boolean first)
|
| Cursor |
findNext(Session session, SearchRow first, SearchRow last)
|
| Cursor |
findNext(Session session, SearchRow first, SearchRow last)
|
| double |
getCost(Session session, int[] masks, TableFilter[] filters, int filter, SortOrder sortOrder, HashSet allColumnsSet)
|
| double |
getCost(Session session, int[] masks, TableFilter[] filters, int filter, SortOrder sortOrder, HashSet allColumnsSet)
|
| long |
getDiskSpaceUsed()
|
| long |
getDiskSpaceUsed()
|
| int |
getMemoryPerPage()
|
| int |
getMemoryPerPage()
|
| PageBtree |
getPage(int id)
Read the given page.
|
| PageBtree |
getPage(int id)
Read the given page.
Parameters:
id - the page id
Returns:
the page
|
| PageStore |
getPageStore()
|
| PageStore |
getPageStore()
|
| Row |
getRow(Session session, long key)
Get a row from the main index.
|
| Row |
getRow(Session session, long key)
Get a row from the main index.
Parameters:
session - the session
key - the row key
Returns:
the row
|
| long |
getRowCount(Session session)
|
| long |
getRowCount(Session session)
|
| long |
getRowCountApproximation()
|
| long |
getRowCountApproximation()
|
| int |
getRowSize(Data dummy, SearchRow row, boolean onlyPosition)
Get the size of a row (only the part that is stored in the index).
|
| int |
getRowSize(Data dummy, SearchRow row, boolean onlyPosition)
Get the size of a row (only the part that is stored in the index).
Parameters:
dummy - a dummy data page to calculate the size
row - the row
onlyPosition - whether only the position of the row is stored
Returns:
the number of bytes
|
| boolean |
hasData(SearchRow row)
Check whether the given row contains data.
|
| boolean |
hasData(SearchRow row)
Check whether the given row contains data.
Parameters:
row - the row
Returns:
true if it contains data
|
| void |
memoryChange(int x)
The memory usage of a page was changed.
|
| void |
memoryChange(int x)
The memory usage of a page was changed. The new value is used to adopt
the average estimated memory size of a page.
Parameters:
x - the new memory size
|
| boolean |
needRebuild()
|
| boolean |
needRebuild()
|
| SearchRow |
readRow(Data data, int offset, boolean onlyPosition, boolean needData)
Read a row from the data page at the given offset.
|
| SearchRow |
readRow(Data data, int offset, boolean onlyPosition, boolean needData)
Read a row from the data page at the given offset.
Parameters:
data - the data
offset - the offset
onlyPosition - whether only the position of the row is stored
needData - whether the row data is required
Returns:
the row
|
| SearchRow |
readRow(long key)
Get the complete row from the data index.
|
| SearchRow |
readRow(long key)
Get the complete row from the data index.
Parameters:
key - the key
Returns:
the row
|
| void |
remove(Session session, Row row)
|
| void |
remove(Session session, Row row)
|
| void |
remove(Session session)
|
| void |
remove(Session session)
|
| void |
setRootPageId(Session session, int newPos)
The root page has changed.
|
| void |
setRootPageId(Session session, int newPos)
The root page has changed.
Parameters:
session - the session
newPos - the new position
|
| void |
truncate(Session session)
|
| void |
truncate(Session session)
|
| void |
writeRow(Data data, int offset, SearchRow row, boolean onlyPosition)
Write a row to the data page at the given offset.
|
| void |
writeRow(Data data, int offset, SearchRow row, boolean onlyPosition)
Write a row to the data page at the given offset.
Parameters:
data - the data
offset - the offset
onlyPosition - whether only the position of the row is stored
row - the row to write
|
| void |
writeRowCount()
|
| void |
writeRowCount()
|