Package com.mckoi.database
Class NaturallyJoinedTable
java.lang.Object
com.mckoi.database.Table
com.mckoi.database.JoinedTable
com.mckoi.database.NaturallyJoinedTable
- All Implemented Interfaces:
TableDataSource
A table that is the cartesian product of two tables. This provides
better memory-use and efficiency than a materialized table backed by a
VirtualTable.
- Author:
- Tobias Downer
-
Field Summary
Fields inherited from class com.mckoi.database.JoinedTable
column_filter, column_scheme, column_table, reference_listFields inherited from class com.mckoi.database.Table
DEBUG_QUERY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of rows stored in the table.protected voidresolveAllRowsForTableAt(IntegerVector row_set, int table_num) Given an IntegerVector that represents a list of pointers to rows in this table, this resolves the rows to row indexes in the given parent table.protected intresolveRowForTableAt(int row_number, int table_num) Given a row and a table index (to a parent reference table), this will return the row index in the given parent table for the given row.Methods inherited from class com.mckoi.database.JoinedTable
findFieldName, getCellContents, getColumnCount, getDatabase, getDataTableDef, getReferenceTables, getResolvedVariable, hasRootsLocked, init, lockRoot, printGraph, rowEnumeration, unlockRootMethods inherited from class com.mckoi.database.Table
all, allColumnMatchesValue, any, columnContainsCell, columnContainsValue, columnMatchesValue, columnMerge, compareCells, Debug, distinct, distinct, dumpTo, emptySelect, exhaustiveSelect, fastFindFieldName, getColumnDefAt, getColumnScheme, getFirstCellContent, getFirstCellContent, getLastCellContent, getLastCellContent, getSingleCellContent, getSingleCellContent, getSystem, getTableAccessState, getTTypeForColumn, getTTypeForColumn, join, orderByColumn, orderByColumn, orderByColumn, orderByColumns, orderedRowList, outside, rangeSelect, selectAll, selectAll, selectFirst, selectLast, selectRange, selectRest, simpleJoin, simpleSelect, singleRowSelect, toMap, toString, union
-
Constructor Details
-
NaturallyJoinedTable
Constructs the table.
-
-
Method Details
-
getRowCount
public int getRowCount()Description copied from class:TableReturns the number of rows stored in the table.- Specified by:
getRowCountin interfaceTableDataSource- Specified by:
getRowCountin classTable
-
resolveRowForTableAt
protected int resolveRowForTableAt(int row_number, int table_num) Description copied from class:JoinedTableGiven a row and a table index (to a parent reference table), this will return the row index in the given parent table for the given row.- Specified by:
resolveRowForTableAtin classJoinedTable
-
resolveAllRowsForTableAt
Description copied from class:JoinedTableGiven an IntegerVector that represents a list of pointers to rows in this table, this resolves the rows to row indexes in the given parent table. This method changes the 'row_set' IntegerVector object.- Specified by:
resolveAllRowsForTableAtin classJoinedTable
-