public interface Table extends Deflatable<Table>, LongSizedDataStructure, LivenessNode
Modifier and Type | Interface and Description |
---|---|
static class |
Table.AsOfMatchRule |
static class |
Table.ByStrategy |
static class |
Table.GroupStrategy
GroupStrategy is used for joins and other operations that can choose one of several ways to make use of grouping
information.
|
static class |
Table.JoinStrategy |
static interface |
Table.RenameFunction |
Modifier and Type | Field and Description |
---|---|
static String |
ACL_ATTRIBUTE |
static String |
COLUMN_RENDERERS_ATTRIBUTE |
static String |
CUSTOM_ACTIONS_ATTRIBUTE |
static String |
DO_NOT_MAKE_REMOTE_ATTRIBUTE |
static String |
EMPTY_SOURCE_TABLE_ATTRIBUTE
This attribute is applied to source tables, and takes on Boolean values.
|
static String |
HIERARCHICAL_CHILDREN_TABLE_MAP_ATTRIBUTE |
static String |
HIERARCHICAL_SOURCE_INFO_ATTRIBUTE |
static String |
HIERARCHICAL_SOURCE_TABLE_ATTRIBUTE |
static String |
INPUT_TABLE_ATTRIBUTE |
static String |
KEY_COLUMNS_ATTRIBUTE |
static String |
LAYOUT_HINTS_ATTRIBUTE |
static String |
MERGED_TABLE_ATTRIBUTE
This attribute is used internally by TableTools.merge to detect successive merges.
|
static String |
PREPARED_RLL_ATTRIBUTE |
static String |
REVERSE_LOOKUP_ATTRIBUTE |
static String |
ROLLUP_LEAF_ATTRIBUTE |
static String |
SORTABLE_COLUMNS_ATTRIBUTE |
static String |
TOTALS_TABLE_ATTRIBUTE |
static String |
TREE_TABLE_FILTER_REVERSE_LOOKUP_ATTRIBUTE |
static String |
UNIQUE_KEYS_ATTRIBUTE |
Modifier and Type | Method and Description |
---|---|
default Table |
absSumBy(Collection<String> groupByColumns) |
default Table |
absSumBy(String... groupByColumns)
Groups the data column according to
groupByColumns and computes the sum of the absolute values for the rest of the fields |
default Table |
absSumBy(Table.ByStrategy byStrategy,
Collection<String> groupByColumns) |
Table |
absSumBy(Table.ByStrategy byStrategy,
SelectColumn... groupByColumns) |
default Table |
absSumBy(Table.ByStrategy byStrategy,
String... groupByColumns) |
void |
addColumnGrouping(String columnName)
Deprecated.
|
default Table |
aj(Table.JoinStrategy joinStrategy,
Table rightTable,
Collection<String> columnsToMatch) |
default Table |
aj(Table.JoinStrategy joinStrategy,
Table rightTable,
Collection<String> columnsToMatch,
Collection<String> columnsToAdd) |
default Table |
aj(Table.JoinStrategy joinStrategy,
Table rightTable,
MatchPair[] columnsToMatch,
MatchPair[] columnsToAdd) |
Table |
aj(Table.JoinStrategy joinStrategy,
Table rightTable,
MatchPair[] columnsToMatch,
MatchPair[] columnsToAdd,
Table.AsOfMatchRule asOfMatchRule) |
default Table |
aj(Table.JoinStrategy joinStrategy,
Table rightTable,
String columnsToMatch) |
default Table |
aj(Table.JoinStrategy joinStrategy,
Table rightTable,
String columnsToMatch,
String columnsToAdd) |
default Table |
aj(Table rightTable,
String columnsToMatch) |
default Table |
aj(Table rightTable,
String columnsToMatch,
String columnsToAdd)
Looks up the columns in the rightTable that meet the match conditions in the columnsToMatch list.
|
default <R> R |
apply(com.fishlib.base.Function.Unary<R,Table> function)
Applies a function to this table.
|
default Table |
applyToAllBy(String formulaColumn,
SelectColumn... groupByColumns)
Groups data according to groupByColumns and applies formulaColumn to each of columns not altered by the grouping operation.
|
default Table |
applyToAllBy(String formulaColumn,
String... groupByColumns)
Groups data according to groupByColumns and applies formulaColumn to each of columns not altered by the grouping operation.
|
default Table |
applyToAllBy(String formulaColumn,
String groupByColumn) |
Table |
applyToAllBy(String formulaColumn,
String columnParamName,
SelectColumn... groupByColumns)
Groups data according to groupByColumns and applies formulaColumn to each of columns not altered by the grouping
operation.
|
default Table |
avgBy(String... groupByColumns)
Groups the data column according to
groupByColumns and computes the average for the rest of the fields |
default Table |
avgBy(Table.ByStrategy byStrategy,
Collection<String> groupByColumns) |
Table |
avgBy(Table.ByStrategy byStrategy,
SelectColumn... groupByColumns) |
default Table |
avgBy(Table.ByStrategy byStrategy,
String... groupByColumns) |
default Table |
by() |
default Table |
by(AggregationStateFactory aggregationStateFactory) |
default Table |
by(AggregationStateFactory aggregationStateFactory,
SelectColumn... groupByColumns) |
default Table |
by(AggregationStateFactory aggregationStateFactory,
String... groupByColumns) |
default Table |
by(Collection<String> groupByColumns) |
default Table |
by(SelectColumn... groupByColumns) |
default Table |
by(String... groupByColumns) |
default Table |
by(Table.ByStrategy byStrategy) |
default Table |
by(Table.ByStrategy byStrategy,
AggregationStateFactory aggregationStateFactory) |
Table |
by(Table.ByStrategy byStrategy,
AggregationStateFactory aggregationStateFactory,
SelectColumn... groupByColumns) |
default Table |
by(Table.ByStrategy byStrategy,
AggregationStateFactory aggregationStateFactory,
String... groupByColumns) |
default Table |
by(Table.ByStrategy byStrategy,
Collection<String> groupByColumns) |
default Table |
by(Table.ByStrategy byStrategy,
SelectColumn... groupByColumns) |
default Table |
by(Table.ByStrategy byStrategy,
String... groupByColumns) |
default TableMap |
byExternal(boolean dropKeys,
String... columnNames) |
default TableMap |
byExternal(String... columnNames) |
TableMap |
byExternal(Table.ByStrategy byStrategy,
boolean dropKeys,
String... columnNames) |
default TableMap |
byExternal(Table.ByStrategy byStrategy,
String... columnNames) |
default ByteColumnIterator |
byteColumnIterator(String columnName) |
default CharacterColumnIterator |
characterColumnIterator(String columnName) |
Table |
clearSortingRestrictions()
Clear all sorting restrictions that was applied to the current table.
|
default void |
close()
Release resources held by this table, possibly destructively.
|
default Table |
coalesce()
Explicitly ensure that any work needed to make a table indexable, iterable, or queryable has been done, and
return the coalesced child table if appropriate.
|
default <TYPE> Iterator<TYPE> |
columnIterator(String columnName) |
default Table |
countBy(String countColumnName) |
default Table |
countBy(String countColumnName,
Collection<String> groupByColumns) |
default Table |
countBy(String countColumnName,
SelectColumn... groupByColumns) |
default Table |
countBy(String countColumnName,
String... groupByColumns) |
default Table |
countBy(Table.ByStrategy byStrategy,
String countColumnName) |
default Table |
countBy(Table.ByStrategy byStrategy,
String countColumnName,
Collection<String> groupByColumns) |
Table |
countBy(Table.ByStrategy byStrategy,
String countColumnName,
SelectColumn... groupByColumns) |
default Table |
countBy(Table.ByStrategy byStrategy,
String countColumnName,
String... groupByColumns) |
default Table |
dateTimeColumnAsNanos(String columnName) |
default Table |
dateTimeColumnAsNanos(String dateTimeColumnName,
String nanosColumnName)
Produce a new table with the same columns as this table, but with a new column presenting the specified
DBDateTime column as a Long column (with each DBDateTime represented instead as the corresponding number of
nanos since the epoch).
|
default Inflatable<Table> |
deflate(ExportedObjectClient client) |
default Inflatable<Table> |
deflate(ExportedObjectClient client,
boolean preSubscribed,
boolean preSubscribedViewport)
Deflate, but provide an extra boolean telling us whether we are presubscribing this preemptive table.
|
default DoubleColumnIterator |
doubleColumnIterator(String columnName) |
default Table |
dropColumnFormats() |
default Table |
dropColumns(Collection<String> columnNames) |
Table |
dropColumns(String... columnNames) |
default Table |
exactJoin(Table.JoinStrategy joinStrategy,
Table rightTable,
Collection<String> columnsToMatch) |
default Table |
exactJoin(Table.JoinStrategy joinStrategy,
Table rightTable,
Collection<String> columnsToMatch,
Collection<String> columnsToAdd) |
Table |
exactJoin(Table.JoinStrategy joinStrategy,
Table rightTable,
MatchPair[] columnsToMatch,
MatchPair[] columnsToAdd) |
default Table |
exactJoin(Table.JoinStrategy joinStrategy,
Table rightTable,
String columnsToMatch) |
default Table |
exactJoin(Table.JoinStrategy joinStrategy,
Table rightTable,
String columnsToMatch,
String columnsToAdd) |
default Table |
exactJoin(Table rightTable,
String columnsToMatch) |
default Table |
exactJoin(Table rightTable,
String columnsToMatch,
String columnsToAdd) |
default Table |
firstBy() |
default Table |
firstBy(Collection<String> groupByColumns) |
default Table |
firstBy(SelectColumn... groupByColumns) |
default Table |
firstBy(String... groupByColumns)
Groups the data column according to
groupByColumns and retrieves the first for the rest of the fields |
default Table |
firstBy(Table.ByStrategy byStrategy) |
default Table |
firstBy(Table.ByStrategy byStrategy,
Collection<String> groupByColumns) |
Table |
firstBy(Table.ByStrategy byStrategy,
SelectColumn... groupByColumns) |
default Table |
firstBy(Table.ByStrategy byStrategy,
String... groupByColumns) |
Table |
flatten()
Creates a version of this table with a flat index (V2 only).
|
default FloatColumnIterator |
floatColumnIterator(String columnName) |
default Table |
formatColumns(String... columnFormats) |
default Table |
formatColumnWhere(String columnName,
String condition,
String formula) |
default Table |
formatRowWhere(String condition,
String formula) |
Object |
getAttribute(String key) |
Set<String> |
getAttributeNames() |
default Map<String,Object> |
getAttributes()
Get all of the attributes from the table.
|
Map<String,Object> |
getAttributes(Collection<String> excluded)
Get all attributes from the desired table except the items that appear in excluded.
|
default DataColumn |
getColumn(int columnIndex) |
DataColumn |
getColumn(String columnName) |
default DataColumn[] |
getColumns() |
ColumnSource |
getColumnSource(String sourceName) |
Map<String,? extends ColumnSource> |
getColumnSourceMap() |
Collection<? extends ColumnSource> |
getColumnSources() |
TableDefinition |
getDefinition() |
String |
getDescription() |
Index |
getIndex() |
default Table |
getMeta()
Provides column metadata in Table form.
|
Object[] |
getRecord(long rowNo,
String... columnNames) |
Table |
getSubTable(Index index) |
default Table |
getViewPort()
Called on client side of a preemptive table to create the replicated table which represents
the server side preemptive table, but instead of looking at the whole table, we're just interested
in the slice we can see on the screen.
|
boolean |
hasAttribute(String name) |
default boolean |
hasColumns(Collection<String> columnNames)
Determines whether this Table contains a column for each string in the specified collection of
columnNames . |
default boolean |
hasColumns(String... columnNames)
Determines whether this Table contains a column for each string in the specified array of
columnNames . |
Table |
head(long size) |
default Table |
headBy(long nRows,
Collection<String> groupByColumns) |
default Table |
headBy(long nRows,
SelectColumn... groupByColumns) |
Table |
headBy(long nRows,
String... groupByColumns) |
Table |
headPct(double percent)
Provides a head that selects a dynamic number of rows based on a percent.
|
default IntegerColumnIterator |
integerColumnIterator(String columnName) |
default boolean |
isEmpty()
Returns
true if this table has no rows (i.e. |
boolean |
isFlat()
Return true if this table is guaranteed to be flat.
|
default boolean |
isLive() |
default Table |
join(Table.JoinStrategy joinStrategy,
Table rightTable) |
default Table |
join(Table.JoinStrategy joinStrategy,
Table rightTable,
Collection<String> columnsToMatch) |
default Table |
join(Table.JoinStrategy joinStrategy,
Table rightTable,
Collection<String> columnsToMatch,
Collection<String> columnsToAdd) |
Table |
join(Table.JoinStrategy joinStrategy,
Table rightTable,
MatchPair[] columnsToMatch,
MatchPair[] columnsToAdd) |
default Table |
join(Table.JoinStrategy joinStrategy,
Table rightTable,
String columnsToMatch) |
default Table |
join(Table.JoinStrategy joinStrategy,
Table rightTable,
String columnsToMatch,
String columnsToAdd) |
default Table |
join(Table rightTable) |
default Table |
join(Table rightTable,
String columnsToMatch) |
default Table |
join(Table rightTable,
String columnsToMatch,
String columnsToAdd) |
default Table |
lastBy() |
default Table |
lastBy(Collection<String> groupByColumns) |
default Table |
lastBy(SelectColumn... groupByColumns) |
default Table |
lastBy(String... groupByColumns)
Groups the data column according to
groupByColumns and retrieves the last for the rest of the fields |
default Table |
lastBy(Table.ByStrategy byStrategy) |
default Table |
lastBy(Table.ByStrategy byStrategy,
Collection<String> groupByColumns) |
Table |
lastBy(Table.ByStrategy byStrategy,
SelectColumn... groupByColumns) |
default Table |
lastBy(Table.ByStrategy byStrategy,
String... groupByColumns) |
default Table |
layoutHints(LayoutHintBuilder builder) |
Table |
layoutHints(String hints) |
default Table |
lazyUpdate(Collection<String> newColumns) |
Table |
lazyUpdate(SelectColumn... newColumns)
Compute column formulas on demand.
|
default Table |
lazyUpdate(String... newColumns) |
default Table |
leftJoin(Table.JoinStrategy joinStrategy,
Table rightTable) |
default Table |
leftJoin(Table.JoinStrategy joinStrategy,
Table rightTable,
Collection<String> columnsToMatch) |
default Table |
leftJoin(Table.JoinStrategy joinStrategy,
Table rightTable,
Collection<String> columnsToMatch,
Collection<String> columnsToAdd) |
Table |
leftJoin(Table.JoinStrategy joinStrategy,
Table rightTable,
MatchPair[] columnsToMatch,
MatchPair[] columnsToAdd)
Returns a table that has one column for each original table's columns, and one column corresponding to each of
the input table (right table) columns listed in the columns to add (or all the columns whose names don't overlap
with the name of a column from the source table if the columnsToAdd is length zero).
|
default Table |
leftJoin(Table.JoinStrategy joinStrategy,
Table rightTable,
String columnsToMatch) |
default Table |
leftJoin(Table.JoinStrategy joinStrategy,
Table rightTable,
String columnsToMatch,
String columnsToAdd) |
default Table |
leftJoin(Table rightTable) |
default Table |
leftJoin(Table rightTable,
String columnsToMatch) |
default Table |
leftJoin(Table rightTable,
String columnsToMatch,
String columnsToAdd) |
default LongColumnIterator |
longColumnIterator(String columnName) |
default Table |
maxBy(Collection<String> groupByColumns) |
default Table |
maxBy(String... groupByColumns)
Groups the data column according to
groupByColumns and computes the max for the rest of the fields |
default Table |
maxBy(Table.ByStrategy byStrategy,
Collection<String> groupByColumns) |
Table |
maxBy(Table.ByStrategy byStrategy,
SelectColumn... groupByColumns) |
default Table |
maxBy(Table.ByStrategy byStrategy,
String... groupByColumns) |
default Table |
medianBy(Collection<String> groupByColumns) |
default Table |
medianBy(String... groupByColumns)
Groups the data column according to
groupByColumns and computes the median for the rest of the fields |
default Table |
medianBy(Table.ByStrategy byStrategy,
Collection<String> groupByColumns) |
Table |
medianBy(Table.ByStrategy byStrategy,
SelectColumn... groupByColumns) |
default Table |
medianBy(Table.ByStrategy byStrategy,
String... groupByColumns) |
default Table |
minBy(Collection<String> groupByColumns) |
default Table |
minBy(String... groupByColumns)
Groups the data column according to
groupByColumns and computes the min for the rest of the fields |
default Table |
minBy(Table.ByStrategy byStrategy,
Collection<String> groupByColumns) |
Table |
minBy(Table.ByStrategy byStrategy,
SelectColumn... groupByColumns) |
default Table |
minBy(Table.ByStrategy byStrategy,
String... groupByColumns) |
default Table |
moveColumns(int index,
String... columnsToMove)
Produce a new table with the specified columns moved to the specified
index . |
default Table |
moveUpColumns(String... columnsToMove)
Produce a new table with the specified columns moved to the leftmost position.
|
default Table |
naturalJoin(Table.JoinStrategy joinStrategy,
Table rightTable,
Collection<String> columnsToMatch) |
default Table |
naturalJoin(Table.JoinStrategy joinStrategy,
Table rightTable,
Collection<String> columnsToMatch,
Collection<String> columnsToAdd) |
Table |
naturalJoin(Table.JoinStrategy joinStrategy,
Table rightTable,
MatchPair[] columnsToMatch,
MatchPair[] columnsToAdd) |
default Table |
naturalJoin(Table.JoinStrategy joinStrategy,
Table rightTable,
String columnsToMatch) |
default Table |
naturalJoin(Table.JoinStrategy joinStrategy,
Table rightTable,
String columnsToMatch,
String columnsToAdd) |
default Table |
naturalJoin(Table rightTable,
String columnsToMatch) |
default Table |
naturalJoin(Table rightTable,
String columnsToMatch,
String columnsToAdd) |
Table |
preemptiveUpdatesTable(long updateInterval) |
default Table |
raj(Table.JoinStrategy joinStrategy,
Table rightTable,
Collection<String> columnsToMatch) |
default Table |
raj(Table.JoinStrategy joinStrategy,
Table rightTable,
Collection<String> columnsToMatch,
Collection<String> columnsToAdd) |
default Table |
raj(Table.JoinStrategy joinStrategy,
Table rightTable,
MatchPair[] columnsToMatch,
MatchPair[] columnsToAdd) |
Table |
raj(Table.JoinStrategy joinStrategy,
Table rightTable,
MatchPair[] columnsToMatch,
MatchPair[] columnsToAdd,
Table.AsOfMatchRule asOfMatchRule) |
default Table |
raj(Table.JoinStrategy joinStrategy,
Table rightTable,
String columnsToMatch) |
default Table |
raj(Table.JoinStrategy joinStrategy,
Table rightTable,
String columnsToMatch,
String columnsToAdd) |
default Table |
raj(Table rightTable,
String columnsToMatch) |
default Table |
raj(Table rightTable,
String columnsToMatch,
String columnsToAdd)
Just like .aj(), but the matching on the last column is in reverse order, so that you find the row after the
given timestamp instead of the row before.
|
default void |
releaseCachedResources()
Attempt to release cached resources held by this table.
|
default Table |
renameAllColumns(Table.RenameFunction renameFunction) |
default Table |
renameColumns(Collection<String> columns) |
Table |
renameColumns(MatchPair... pairs) |
default Table |
renameColumns(String... columns) |
Table |
restrictSortTo(String... allowedSortingColumns)
Disallow sorting on all but the specified columns.
|
Table |
reverse() |
default Table |
rollup(ComboAggregateFactory comboAggregateFactory,
Collection<String> columns)
Create a rollup table.
|
default Table |
rollup(ComboAggregateFactory comboAggregateFactory,
String... columns)
Create a rollup table.
|
default Table |
rollup(Table.ByStrategy byStrategy,
ComboAggregateFactory comboAggregateFactory,
Collection<String> columns)
Create a rollup table.
|
Table |
rollup(Table.ByStrategy byStrategy,
ComboAggregateFactory comboAggregateFactory,
SelectColumn... columns)
Create a rollup table.
|
default Table |
select() |
default Table |
select(Collection<String> columns) |
Table |
select(SelectColumn... columns) |
default Table |
select(String... columns) |
default Table |
selectDistinct() |
default Table |
selectDistinct(Collection<String> columns) |
Table |
selectDistinct(SelectColumn... columns) |
default Table |
selectDistinct(String... columns) |
void |
setAttribute(String key,
Object object) |
Table |
setColumnRenderers(ColumnRenderersBuilder builder)
Sets renderers for columns.
|
Table |
setTotalsTable(TotalsTableBuilder builder)
Sets parameters for the default totals table display.
|
default ShortColumnIterator |
shortColumnIterator(String columnName) |
default long |
sizeForInstrumentation() |
Table |
snapshot(Table rightTable,
boolean doInitialSnapshot,
String... stampColumns) |
default Table |
snapshot(Table rightTable,
String... stampColumns) |
Table |
snapshotHistory(Table rightTable) |
Table |
snapshotIncremental(Table rightTable,
boolean doInitialSnapshot,
String... stampColumns) |
default Table |
snapshotIncremental(Table rightTable,
String... stampColumns) |
default Table |
sort(List<String> columnsToSortBy) |
Table |
sort(String... columnsToSortBy) |
default Table |
sortDescending(List<String> columnsToSortBy) |
Table |
sortDescending(String... columnToSortBy) |
default Table |
stdBy(String... groupByColumns)
Groups the data column according to
groupByColumns and computes the standard deviation for the rest of the fields |
default Table |
stdBy(Table.ByStrategy byStrategy,
Collection<String> groupByColumns) |
Table |
stdBy(Table.ByStrategy byStrategy,
SelectColumn... groupByColumns) |
default Table |
stdBy(Table.ByStrategy byStrategy,
String... groupByColumns) |
default Table |
subscribeToPreemptiveUpdates()
Called on client side of a preemptive table to create the replicated table which represents
the server side preemptive table.
|
default Table |
sumBy(Collection<String> groupByColumns) |
default Table |
sumBy(String... groupByColumns)
Groups the data column according to
groupByColumns and computes the sum for the rest of the fields |
default Table |
sumBy(Table.ByStrategy byStrategy,
Collection<String> groupByColumns) |
Table |
sumBy(Table.ByStrategy byStrategy,
SelectColumn... groupByColumns) |
default Table |
sumBy(Table.ByStrategy byStrategy,
String... groupByColumns) |
default boolean |
supportsPreemptiveSubscription()
Returns true for client side tables where subscribeToPreemptiveUpdates should return a ReplicatedTable.
|
Table |
tail(long size) |
default Table |
tailBy(long nRows,
Collection<String> groupByColumns) |
default Table |
tailBy(long nRows,
SelectColumn... groupByColumns) |
Table |
tailBy(long nRows,
String... groupByColumns) |
Table |
tailPct(double percent) |
default Table |
treeTable(String idColumn,
String parentColumn)
Create a hierarchical tree table.
|
Table |
treeTable(Table.ByStrategy byStrategy,
String idColumn,
String parentColumn)
Create a hierarchical tree table.
|
default Table |
ungroup() |
Table |
ungroup(String... columnsToUngroup) |
default Table |
ungroupAllBut(String... columnsNotToUngroup) |
default Table |
update(Collection<String> newColumns) |
Table |
update(SelectColumn... newColumns) |
default Table |
update(String... newColumns) |
default Table |
updateView(Collection<String> newColumns) |
Table |
updateView(SelectColumn... newColumns) |
default Table |
updateView(String... newColumns) |
default Table |
varBy(Collection<String> groupByColumns) |
default Table |
varBy(String... groupByColumns)
Groups the data column according to
groupByColumns and computes the variance for the rest of the fields |
default Table |
varBy(Table.ByStrategy byStrategy,
Collection<String> groupByColumns) |
Table |
varBy(Table.ByStrategy byStrategy,
SelectColumn... groupByColumns) |
default Table |
varBy(Table.ByStrategy byStrategy,
String... groupByColumns) |
default Table |
view(Collection<String> columns) |
Table |
view(SelectColumn... columns) |
default Table |
view(String... columns) |
default Table |
wavgBy(String weightColumn,
String... groupByColumns)
Groups the data column according to
groupByColumns and computes the weighted average using
weightColumn for the rest of the fields |
default Table |
wavgBy(Table.ByStrategy byStrategy,
String weightColumn,
Collection<String> groupByColumns)
Groups the data column according to
groupByColumns and computes the weighted average using
weightColumn for the rest of the fields |
Table |
wavgBy(Table.ByStrategy byStrategy,
String weightColumn,
SelectColumn... groupByColumns)
Groups the data column according to
groupByColumns and computes the weighted average using
weightColumn for the rest of the fields |
default Table |
wavgBy(Table.ByStrategy byStrategy,
String weightColumn,
String... groupByColumns)
Groups the data column according to
groupByColumns and computes the weighted average using
weightColumn for the rest of the fields |
default Table |
where() |
default Table |
where(Collection<String> filters) |
Table |
where(SelectFilter... filters) |
default Table |
where(String... filters) |
default Table |
whereDynamic(Table rightTable,
boolean inclusion,
MatchPair... columnsToMatch)
Deprecated.
|
default Table |
whereDynamicIn(Table rightTable,
MatchPair... columnsToMatch)
Deprecated.
|
default Table |
whereDynamicIn(Table rightTable,
String... columnsToMatch)
Deprecated.
|
default Table |
whereDynamicNotIn(Table rightTable,
MatchPair... columnsToMatch)
Deprecated.
|
default Table |
whereDynamicNotIn(Table rightTable,
String... columnsToMatch)
Deprecated.
|
Table |
whereIn(Table.GroupStrategy groupStrategy,
Table rightTable,
boolean inclusion,
MatchPair... columnsToMatch)
Filters this table based on the set of values in the rightTable.
|
default Table |
whereIn(Table.GroupStrategy groupStrategy,
Table rightTable,
boolean inclusion,
String... columnsToMatch) |
default Table |
whereIn(Table.GroupStrategy groupStrategy,
Table rightTable,
MatchPair... columnsToMatch) |
default Table |
whereIn(Table.GroupStrategy groupStrategy,
Table rightTable,
String... columnsToMatch) |
default Table |
whereIn(Table rightTable,
boolean inclusion,
MatchPair... columnsToMatch) |
default Table |
whereIn(Table rightTable,
boolean inclusion,
String... columnsToMatch) |
default Table |
whereIn(Table rightTable,
MatchPair... columnsToMatch) |
default Table |
whereIn(Table rightTable,
String... columnsToMatch) |
default Table |
whereNotIn(Table.GroupStrategy groupStrategy,
Table rightTable,
MatchPair... columnsToMatch) |
default Table |
whereNotIn(Table.GroupStrategy groupStrategy,
Table rightTable,
String... columnsToMatch) |
default Table |
whereNotIn(Table rightTable,
MatchPair... columnsToMatch) |
default Table |
whereNotIn(Table rightTable,
String... columnsToMatch) |
default Table |
whereOneOf() |
default Table |
whereOneOf(Collection<SelectFilter>... filtersToApply)
Filters according to an expression in disjunctive normal form.
|
default Table |
whereOneOf(String... filtersToApplyStrings)
Applies the provided filters to the table disjunctively.
|
Table |
withKeys(String... columns)
Set the table's key columns.
|
Table |
withUniqueKeys(String... columns)
Set the table's key columns and indicate that each key set will be unique.
|
maybeDeflate
intSize, intSize, intSize, size
dropReference, getReferentDescription, getWeakReference, retainReference, tryRetainReference
manage, tryManage
static final String ACL_ATTRIBUTE
static final String DO_NOT_MAKE_REMOTE_ATTRIBUTE
static final String CUSTOM_ACTIONS_ATTRIBUTE
static final String INPUT_TABLE_ATTRIBUTE
static final String KEY_COLUMNS_ATTRIBUTE
static final String UNIQUE_KEYS_ATTRIBUTE
static final String SORTABLE_COLUMNS_ATTRIBUTE
static final String LAYOUT_HINTS_ATTRIBUTE
static final String TOTALS_TABLE_ATTRIBUTE
static final String COLUMN_RENDERERS_ATTRIBUTE
static final String ROLLUP_LEAF_ATTRIBUTE
static final String HIERARCHICAL_CHILDREN_TABLE_MAP_ATTRIBUTE
static final String HIERARCHICAL_SOURCE_TABLE_ATTRIBUTE
static final String TREE_TABLE_FILTER_REVERSE_LOOKUP_ATTRIBUTE
static final String HIERARCHICAL_SOURCE_INFO_ATTRIBUTE
static final String REVERSE_LOOKUP_ATTRIBUTE
static final String PREPARED_RLL_ATTRIBUTE
static final String MERGED_TABLE_ATTRIBUTE
static final String EMPTY_SOURCE_TABLE_ATTRIBUTE
This attribute is applied to source tables, and takes on Boolean values.
Table.coalesce()
source tables and their children if the source table is empty.Table.coalesce()
source tables and their children if the source table is non-empty.TableDefinition getDefinition()
default Table getMeta()
String getDescription()
default boolean hasColumns(String... columnNames)
columnNames
.columnNames
- The array of column names to be checked for inclusion in this table. Must not be null
.true
if this Table contains a column for each and every string in the columnNames
array;
false
if any element of columnNames
is not the name of a column in this tabledefault boolean hasColumns(Collection<String> columnNames)
columnNames
.columnNames
- The collection of column names to be checked for inclusion in this table. Must not be null
.true
if this Table contains a column for each and every string in the columnNames
collection;
false
if any element of columnNames
is not the name of a column in this tableboolean hasAttribute(String name)
default Map<String,Object> getAttributes()
Map<String,Object> getAttributes(Collection<String> excluded)
excluded
- A set of attributes to exclude from the resultdefault boolean isLive()
default Table coalesce()
Index getIndex()
default long sizeForInstrumentation()
default boolean isEmpty()
true
if this table has no rows (i.e. size() == 0
).true
if this table has no rowsColumnSource getColumnSource(String sourceName)
Map<String,? extends ColumnSource> getColumnSourceMap()
Collection<? extends ColumnSource> getColumnSources()
default DataColumn[] getColumns()
default DataColumn getColumn(int columnIndex)
DataColumn getColumn(String columnName)
default ByteColumnIterator byteColumnIterator(@NotNull String columnName)
default CharacterColumnIterator characterColumnIterator(@NotNull String columnName)
default DoubleColumnIterator doubleColumnIterator(@NotNull String columnName)
default FloatColumnIterator floatColumnIterator(@NotNull String columnName)
default IntegerColumnIterator integerColumnIterator(@NotNull String columnName)
default LongColumnIterator longColumnIterator(@NotNull String columnName)
default ShortColumnIterator shortColumnIterator(@NotNull String columnName)
Table where(SelectFilter... filters)
default Table where(Collection<String> filters)
default Table where()
Table whereIn(Table.GroupStrategy groupStrategy, Table rightTable, boolean inclusion, MatchPair... columnsToMatch)
rightTable
- the filtering table.inclusion
- whether things included in rightTable should be passed through (they are exluded if false)columnsToMatch
- the columns to match between the two tablesdefault Table whereIn(Table.GroupStrategy groupStrategy, Table rightTable, String... columnsToMatch)
default Table whereIn(Table.GroupStrategy groupStrategy, Table rightTable, MatchPair... columnsToMatch)
default Table whereNotIn(Table.GroupStrategy groupStrategy, Table rightTable, String... columnsToMatch)
default Table whereNotIn(Table.GroupStrategy groupStrategy, Table rightTable, MatchPair... columnsToMatch)
default Table whereIn(Table.GroupStrategy groupStrategy, Table rightTable, boolean inclusion, String... columnsToMatch)
@Deprecated default Table whereDynamic(Table rightTable, boolean inclusion, MatchPair... columnsToMatch)
@Deprecated default Table whereDynamicIn(Table rightTable, MatchPair... columnsToMatch)
@Deprecated default Table whereDynamicNotIn(Table rightTable, MatchPair... columnsToMatch)
@Deprecated default Table whereDynamicIn(Table rightTable, String... columnsToMatch)
@Deprecated default Table whereDynamicNotIn(Table rightTable, String... columnsToMatch)
default Table whereOneOf(Collection<SelectFilter>... filtersToApply)
The input is an array of clauses, which in turn are a collection of filters.
filtersToApply
- each inner collection is a set of filters, all of must which match for the clause to
be true. If any one of the collections in the array evaluates to true, the row is part
of the output table.default Table whereOneOf(String... filtersToApplyStrings)
filtersToApplyStrings
- an Array of filters to applydefault Table whereOneOf()
Table select(SelectColumn... columns)
default Table select(Collection<String> columns)
default Table select()
Table selectDistinct(SelectColumn... columns)
default Table selectDistinct(Collection<String> columns)
default Table selectDistinct()
Table update(SelectColumn... newColumns)
default Table update(Collection<String> newColumns)
Table lazyUpdate(SelectColumn... newColumns)
Lazy update defers computation until required for a set of values, and caches the results for a set of input values. This uses less RAM than an update statement when you have a smaller set of unique values. Less computation than an updateView is needed, because the resutls are saved in a cache.
If you have many unique values, you should instead use an update statement, which will have more memory efficient structures. Values are never removed from the lazyUpdate cache, so it should be used judiciously on a ticking table.
newColumns
- the columns to adddefault Table lazyUpdate(Collection<String> newColumns)
Table view(SelectColumn... columns)
default Table view(Collection<String> columns)
Table updateView(SelectColumn... newColumns)
default Table updateView(Collection<String> newColumns)
default Table dropColumnFormats()
default Table dropColumns(Collection<String> columnNames)
default Table renameColumns(Collection<String> columns)
default Table renameAllColumns(Table.RenameFunction renameFunction)
default Table formatColumnWhere(String columnName, String condition, String formula)
default Table moveUpColumns(String... columnsToMove)
"NewColumnName=OldColumnName")
.columnsToMove
- The columns to move to the left (and, optionally, to rename)Table.moveColumns(int, String...)
default Table moveColumns(int index, String... columnsToMove)
index
. Column indices begin at 0.
Columns can be renamed with the usual syntax, i.e. "NewColumnName=OldColumnName")
.index
- The index to which the specified columns should be movedcolumnsToMove
- The columns to move to the specified index (and, optionally, to rename)default Table dateTimeColumnAsNanos(String dateTimeColumnName, String nanosColumnName)
NOTE: This is a really just an updateView(), and behaves accordingly for column ordering and (re)placement. This doesn't work on data that has been brought fully into memory (e.g. via select()). Use a view instead.
dateTimeColumnName
- nanosColumnName
- default Table dateTimeColumnAsNanos(String columnName)
columnName
- Table head(long size)
Table tail(long size)
Table headPct(double percent)
percent
- the fraction of the table to return (0..1), the number of rows will be rounded up. For example
if there are 3 rows, headPct(50) returns the first two rows.Table tailPct(double percent)
Table leftJoin(Table.JoinStrategy joinStrategy, Table rightTable, MatchPair[] columnsToMatch, MatchPair[] columnsToAdd)
NOTE: leftJoin operation does not involve an actual data copy, or an in-memory table creation. In order to produce an actual in memory table you need to apply a select call on the join result.
rightTable
- input tablecolumnsToMatch
- match criteriacolumnsToAdd
- columns to adddefault Table leftJoin(Table.JoinStrategy joinStrategy, Table rightTable, Collection<String> columnsToMatch, Collection<String> columnsToAdd)
default Table leftJoin(Table.JoinStrategy joinStrategy, Table rightTable, Collection<String> columnsToMatch)
default Table leftJoin(Table.JoinStrategy joinStrategy, Table rightTable, String columnsToMatch, String columnsToAdd)
default Table leftJoin(Table.JoinStrategy joinStrategy, Table rightTable, String columnsToMatch)
default Table leftJoin(Table.JoinStrategy joinStrategy, Table rightTable)
Table exactJoin(Table.JoinStrategy joinStrategy, Table rightTable, MatchPair[] columnsToMatch, MatchPair[] columnsToAdd)
default Table exactJoin(Table.JoinStrategy joinStrategy, Table rightTable, Collection<String> columnsToMatch, Collection<String> columnsToAdd)
default Table exactJoin(Table.JoinStrategy joinStrategy, Table rightTable, Collection<String> columnsToMatch)
default Table exactJoin(Table.JoinStrategy joinStrategy, Table rightTable, String columnsToMatch, String columnsToAdd)
default Table exactJoin(Table.JoinStrategy joinStrategy, Table rightTable, String columnsToMatch)
Table aj(Table.JoinStrategy joinStrategy, Table rightTable, MatchPair[] columnsToMatch, MatchPair[] columnsToAdd, Table.AsOfMatchRule asOfMatchRule)
default Table aj(Table.JoinStrategy joinStrategy, Table rightTable, MatchPair[] columnsToMatch, MatchPair[] columnsToAdd)
default Table aj(Table.JoinStrategy joinStrategy, Table rightTable, Collection<String> columnsToMatch, Collection<String> columnsToAdd)
default Table aj(Table.JoinStrategy joinStrategy, Table rightTable, Collection<String> columnsToMatch)
default Table aj(Table.JoinStrategy joinStrategy, Table rightTable, String columnsToMatch, String columnsToAdd)
default Table aj(Table.JoinStrategy joinStrategy, Table rightTable, String columnsToMatch)
default Table aj(Table rightTable, String columnsToMatch, String columnsToAdd)
rightTable
- The right side table on the join.columnsToMatch
- A comma separated list of match conditions ("leftColumn=rightColumn" or "columnFoundInBoth")columnsToAdd
- A comma separated list with the columns from the left side that need to be added to the right
side as a result of the match.Table raj(Table.JoinStrategy joinStrategy, Table rightTable, MatchPair[] columnsToMatch, MatchPair[] columnsToAdd, Table.AsOfMatchRule asOfMatchRule)
default Table raj(Table.JoinStrategy joinStrategy, Table rightTable, MatchPair[] columnsToMatch, MatchPair[] columnsToAdd)
default Table raj(Table.JoinStrategy joinStrategy, Table rightTable, Collection<String> columnsToMatch, Collection<String> columnsToAdd)
default Table raj(Table.JoinStrategy joinStrategy, Table rightTable, Collection<String> columnsToMatch)
default Table raj(Table.JoinStrategy joinStrategy, Table rightTable, String columnsToMatch, String columnsToAdd)
default Table raj(Table.JoinStrategy joinStrategy, Table rightTable, String columnsToMatch)
default Table raj(Table rightTable, String columnsToMatch, String columnsToAdd)
Looks up the columns in the rightTable that meet the match conditions in the columnsToMatch list. Matching is done exactly for the first n-1 columns and via a binary search for the last match pair. The columns of the original table are returned intact, together with the columns from rightTable defined in a comma separated list "columnsToAdd"
rightTable
- The right side table on the join.columnsToMatch
- A comma separated list of match conditions ("leftColumn=rightColumn" or "columnFoundInBoth")columnsToAdd
- A comma separated list with the columns from the left side that need to be added to the right
side as a result of the match.Table naturalJoin(Table.JoinStrategy joinStrategy, Table rightTable, MatchPair[] columnsToMatch, MatchPair[] columnsToAdd)
default Table naturalJoin(Table.JoinStrategy joinStrategy, Table rightTable, Collection<String> columnsToMatch, Collection<String> columnsToAdd)
default Table naturalJoin(Table.JoinStrategy joinStrategy, Table rightTable, Collection<String> columnsToMatch)
default Table naturalJoin(Table.JoinStrategy joinStrategy, Table rightTable, String columnsToMatch, String columnsToAdd)
default Table naturalJoin(Table.JoinStrategy joinStrategy, Table rightTable, String columnsToMatch)
Table join(Table.JoinStrategy joinStrategy, Table rightTable, MatchPair[] columnsToMatch, MatchPair[] columnsToAdd)
default Table join(Table.JoinStrategy joinStrategy, Table rightTable, Collection<String> columnsToMatch, Collection<String> columnsToAdd)
default Table join(Table.JoinStrategy joinStrategy, Table rightTable, Collection<String> columnsToMatch)
default Table join(Table.JoinStrategy joinStrategy, Table rightTable, String columnsToMatch, String columnsToAdd)
default Table join(Table.JoinStrategy joinStrategy, Table rightTable, String columnsToMatch)
default Table join(Table.JoinStrategy joinStrategy, Table rightTable)
Table by(Table.ByStrategy byStrategy, AggregationStateFactory aggregationStateFactory, SelectColumn... groupByColumns)
default Table by(Table.ByStrategy byStrategy, AggregationStateFactory aggregationStateFactory, String... groupByColumns)
default Table by(Table.ByStrategy byStrategy, AggregationStateFactory aggregationStateFactory)
default Table by(AggregationStateFactory aggregationStateFactory, SelectColumn... groupByColumns)
default Table by(AggregationStateFactory aggregationStateFactory, String... groupByColumns)
default Table by(AggregationStateFactory aggregationStateFactory)
default Table by(Table.ByStrategy byStrategy, SelectColumn... groupByColumns)
default Table by(Table.ByStrategy byStrategy, String... groupByColumns)
default Table by(Table.ByStrategy byStrategy, Collection<String> groupByColumns)
default Table by(Table.ByStrategy byStrategy)
default Table by(SelectColumn... groupByColumns)
default Table by(Collection<String> groupByColumns)
default Table by()
default Table headBy(long nRows, SelectColumn... groupByColumns)
default Table headBy(long nRows, Collection<String> groupByColumns)
default Table tailBy(long nRows, SelectColumn... groupByColumns)
default Table tailBy(long nRows, Collection<String> groupByColumns)
Table applyToAllBy(String formulaColumn, String columnParamName, SelectColumn... groupByColumns)
columnParamName
is used as place-holder for the name of each column inside
formulaColumn
.formulaColumn
- Formula applied to each columncolumnParamName
- The parameter name used as a placeholder for each columngroupByColumns
- The grouping columns Table.by(SelectColumn[])
default Table applyToAllBy(String formulaColumn, SelectColumn... groupByColumns)
formulaColumn
- Formula applied to each column, uses parameter each to refer to each colum it being applied togroupByColumns
- The grouping columns Table.by(SelectColumn...)
default Table applyToAllBy(String formulaColumn, String... groupByColumns)
formulaColumn
- Formula applied to each column, uses parameter each to refer to each colum it being applied togroupByColumns
- The grouping columns Table.by(String...)
Table sumBy(Table.ByStrategy byStrategy, SelectColumn... groupByColumns)
default Table sumBy(Table.ByStrategy byStrategy, String... groupByColumns)
default Table sumBy(Table.ByStrategy byStrategy, Collection<String> groupByColumns)
default Table sumBy(String... groupByColumns)
groupByColumns
and computes the sum for the rest of the fieldsgroupByColumns
- The grouping columns Table.by(String...)
default Table sumBy(Collection<String> groupByColumns)
Table absSumBy(Table.ByStrategy byStrategy, SelectColumn... groupByColumns)
default Table absSumBy(Table.ByStrategy byStrategy, String... groupByColumns)
default Table absSumBy(Table.ByStrategy byStrategy, Collection<String> groupByColumns)
default Table absSumBy(String... groupByColumns)
groupByColumns
and computes the sum of the absolute values for the rest of the fieldsgroupByColumns
- The grouping columns Table.by(String...)
default Table absSumBy(Collection<String> groupByColumns)
Table avgBy(Table.ByStrategy byStrategy, SelectColumn... groupByColumns)
default Table avgBy(Table.ByStrategy byStrategy, String... groupByColumns)
default Table avgBy(Table.ByStrategy byStrategy, Collection<String> groupByColumns)
default Table avgBy(String... groupByColumns)
groupByColumns
and computes the average for the rest of the fieldsgroupByColumns
- The grouping columns Table.by(String...)
Table wavgBy(Table.ByStrategy byStrategy, String weightColumn, SelectColumn... groupByColumns)
groupByColumns
and computes the weighted average using
weightColumn for the rest of the fieldsbyStrategy
- a hint to the query engine as to what strategy should be used for performing the by operationweightColumn
- the column to use for the weightgroupByColumns
- The grouping columns Table.by(String...)
default Table wavgBy(Table.ByStrategy byStrategy, String weightColumn, String... groupByColumns)
groupByColumns
and computes the weighted average using
weightColumn for the rest of the fieldsbyStrategy
- a hint to the query engine as to what strategy should be used for performing the by operationweightColumn
- the column to use for the weightgroupByColumns
- The grouping columns Table.by(String...)
default Table wavgBy(Table.ByStrategy byStrategy, String weightColumn, Collection<String> groupByColumns)
groupByColumns
and computes the weighted average using
weightColumn for the rest of the fieldsbyStrategy
- a hint to the query engine as to what strategy should be used for performing the by operationweightColumn
- the column to use for the weightgroupByColumns
- The grouping columns Table.by(String...)
default Table wavgBy(String weightColumn, String... groupByColumns)
groupByColumns
and computes the weighted average using
weightColumn for the rest of the fieldsweightColumn
- the column to use for the weightgroupByColumns
- The grouping columns Table.by(String...)
Table stdBy(Table.ByStrategy byStrategy, SelectColumn... groupByColumns)
default Table stdBy(Table.ByStrategy byStrategy, String... groupByColumns)
default Table stdBy(Table.ByStrategy byStrategy, Collection<String> groupByColumns)
default Table stdBy(String... groupByColumns)
groupByColumns
and computes the standard deviation for the rest of the fieldsgroupByColumns
- The grouping columns Table.by(String...)
Table varBy(Table.ByStrategy byStrategy, SelectColumn... groupByColumns)
default Table varBy(Table.ByStrategy byStrategy, String... groupByColumns)
default Table varBy(Table.ByStrategy byStrategy, Collection<String> groupByColumns)
default Table varBy(String... groupByColumns)
groupByColumns
and computes the variance for the rest of the fieldsgroupByColumns
- The grouping columns Table.by(String...)
default Table varBy(Collection<String> groupByColumns)
Table lastBy(Table.ByStrategy byStrategy, SelectColumn... groupByColumns)
default Table lastBy(Table.ByStrategy byStrategy, String... groupByColumns)
default Table lastBy(Table.ByStrategy byStrategy, Collection<String> groupByColumns)
default Table lastBy(SelectColumn... groupByColumns)
default Table lastBy(String... groupByColumns)
groupByColumns
and retrieves the last for the rest of the fieldsgroupByColumns
- The grouping columns Table.by(String...)
default Table lastBy(Collection<String> groupByColumns)
default Table lastBy(Table.ByStrategy byStrategy)
default Table lastBy()
Table firstBy(Table.ByStrategy byStrategy, SelectColumn... groupByColumns)
default Table firstBy(Table.ByStrategy byStrategy, String... groupByColumns)
default Table firstBy(Table.ByStrategy byStrategy, Collection<String> groupByColumns)
default Table firstBy(SelectColumn... groupByColumns)
default Table firstBy(String... groupByColumns)
groupByColumns
and retrieves the first for the rest of the fieldsgroupByColumns
- The grouping columns Table.by(String...)
default Table firstBy(Collection<String> groupByColumns)
default Table firstBy(Table.ByStrategy byStrategy)
default Table firstBy()
Table minBy(Table.ByStrategy byStrategy, SelectColumn... groupByColumns)
default Table minBy(Table.ByStrategy byStrategy, String... groupByColumns)
default Table minBy(Table.ByStrategy byStrategy, Collection<String> groupByColumns)
default Table minBy(String... groupByColumns)
groupByColumns
and computes the min for the rest of the fieldsgroupByColumns
- The grouping columns Table.by(String...)
default Table minBy(Collection<String> groupByColumns)
Table maxBy(Table.ByStrategy byStrategy, SelectColumn... groupByColumns)
default Table maxBy(Table.ByStrategy byStrategy, String... groupByColumns)
default Table maxBy(Table.ByStrategy byStrategy, Collection<String> groupByColumns)
default Table maxBy(String... groupByColumns)
groupByColumns
and computes the max for the rest of the fieldsgroupByColumns
- The grouping columns Table.by(String...)
}default Table maxBy(Collection<String> groupByColumns)
Table medianBy(Table.ByStrategy byStrategy, SelectColumn... groupByColumns)
default Table medianBy(Table.ByStrategy byStrategy, String... groupByColumns)
default Table medianBy(Table.ByStrategy byStrategy, Collection<String> groupByColumns)
default Table medianBy(String... groupByColumns)
groupByColumns
and computes the median for the rest of the fieldsgroupByColumns
- The grouping columns Table.by(String...)
}default Table medianBy(Collection<String> groupByColumns)
Table countBy(Table.ByStrategy byStrategy, String countColumnName, SelectColumn... groupByColumns)
default Table countBy(Table.ByStrategy byStrategy, String countColumnName, String... groupByColumns)
default Table countBy(Table.ByStrategy byStrategy, String countColumnName, Collection<String> groupByColumns)
default Table countBy(Table.ByStrategy byStrategy, String countColumnName)
default Table countBy(String countColumnName, SelectColumn... groupByColumns)
default Table countBy(String countColumnName, Collection<String> groupByColumns)
default Table ungroup()
TableMap byExternal(Table.ByStrategy byStrategy, boolean dropKeys, String... columnNames)
default TableMap byExternal(Table.ByStrategy byStrategy, String... columnNames)
default Table rollup(ComboAggregateFactory comboAggregateFactory, Collection<String> columns)
comboAggregateFactory
- the ComboAggregateFactory describing the aggregationcolumns
- the columns to group bydefault Table rollup(ComboAggregateFactory comboAggregateFactory, String... columns)
comboAggregateFactory
- the ComboAggregateFactory describing the aggregationcolumns
- the columns to group bydefault Table rollup(Table.ByStrategy byStrategy, ComboAggregateFactory comboAggregateFactory, Collection<String> columns)
byStrategy
- a hint to the query engine as to what strategy should be used for performing the by operationcomboAggregateFactory
- the ComboAggregateFactory describing the aggregationcolumns
- the columns to group byTable rollup(Table.ByStrategy byStrategy, ComboAggregateFactory comboAggregateFactory, SelectColumn... columns)
byStrategy
- a hint to the query engine as to what strategy should be used for performing the by operationcomboAggregateFactory
- the ComboAggregateFactory describing the aggregationcolumns
- the columns to group bydefault Table treeTable(String idColumn, String parentColumn)
idColumn
- the name of a column containing a unique identifier for a particular row in the tableparentColumn
- the name of a column containing the parent's identifier, null for elements that are part of
the root tableTable treeTable(Table.ByStrategy byStrategy, String idColumn, String parentColumn)
byStrategy
- a hint to the query engine as to what strategy should be used for performing the by operationidColumn
- the name of a column containing a unique identifier for a particular row in the tableparentColumn
- the name of a column containing the parent's identifier, null for elements that are part of
the root tableTable reverse()
Table restrictSortTo(String... allowedSortingColumns)
Disallow sorting on all but the specified columns.
allowedSortingColumns
- The columns on which sorting is allowed.Table clearSortingRestrictions()
Clear all sorting restrictions that was applied to the current table.
Note that this table operates on the table it was invoked on and does not
create a new table. So in the following code
T1 = baseTable.where(...)
T2 = T1.restrictSortTo("C1")
T3 = T2.clearSortingRestrictions()
T1 == T2 == T3 and the result has no restrictions on sorting.
Table snapshotIncremental(Table rightTable, boolean doInitialSnapshot, String... stampColumns)
default <R> R apply(com.fishlib.base.Function.Unary<R,Table> function)
This is useful if you have a reference to a table, or a proxy; but not the database and want to run a series of operations against the table without each individual operation resulting in an RMI.
R
- the return type of functionfunction
- the function to run, its single argument will be this tableFunction.Unary#call(Object)
method should be annotated with
AsyncMethod
.boolean isFlat()
Table flatten()
Table withKeys(String... columns)
Table withUniqueKeys(String... columns)
default Table layoutHints(LayoutHintBuilder builder)
Table setTotalsTable(TotalsTableBuilder builder)
builder
- a TotalsTableBuilder
objectTable setColumnRenderers(ColumnRenderersBuilder builder)
builder
- a builder that creates the packed string for the attributedefault void close()
Table.releaseCachedResources()
.default void releaseCachedResources()
Table.close()
, this must not render the table
unusable for subsequent read operations. Implementations should be sure to call
super.releaseCachedResources()
.@Deprecated void addColumnGrouping(String columnName)
Table preemptiveUpdatesTable(long updateInterval)
default Table subscribeToPreemptiveUpdates()
default Table getViewPort()
default boolean supportsPreemptiveSubscription()
default Inflatable<Table> deflate(@NotNull ExportedObjectClient client)
deflate
in interface Deflatable<Table>
default Inflatable<Table> deflate(@NotNull ExportedObjectClient client, boolean preSubscribed, boolean preSubscribedViewport)
client
- the client that we are deflating forpreSubscribed
- if the resultant table will have a preemptive subscription right off the batpreSubscribedViewport
- if the pre-subscription is a viewport (otherwise it is a full subscription)