public class BooleanArrayColumn extends BooleanArrayExpression implements ColumnProvider
Bits are not BLOBs or large objects, rather they are a collection of boolean values stored as a single field in a byte array, or integer.
This class adds the necessary methods to use a collection of bits like a byte[].
Internally the class uses an AbsractColumn to store the column and overrides methods in BooleanArrayExpression to insert the column into the expression.
Support DBvolution at Patreon
RowDefinition,
AbstractColumn,
BooleanArrayExpression| Constructor and Description |
|---|
BooleanArrayColumn(RowDefinition row,
boolean[] field)
Create a BooleanColumn for the supplied field of the supplied row
|
BooleanArrayColumn(RowDefinition row,
DBBooleanArray field)
Create a BooleanColumn for the supplied field of the supplied row
|
| Modifier and Type | Method and Description |
|---|---|
BooleanArrayColumn |
copy()
A Complete Copy Of This DBValue.
|
AbstractColumn |
getColumn()
Returns the AbstractColumn from this ColumnProvider.
|
Set<DBRow> |
getTablesInvolved()
Returns a Set of the DBRow instances involved in this expression.
|
BooleanExpression |
is(DBBooleanArray boolArrayColumn)
Creates an expression that will compare this column to the other column.
|
boolean |
isAggregator()
Returns TRUE if this expression is an Aggregator like SUM() or LEAST().
|
boolean |
isPurelyFunctional()
Indicates whether or not the expression includes table columns.
|
void |
setUseTableAlias(boolean useTableAlias)
Indicates whether the ColumnProvider should use the table alias during
query creation.
|
String |
toSQLString(DBDefinition db)
Produces the snippet provided by this class.
|
asExpressionColumn, getIncludesNull, getInnerBooleanArrayResult, getQueryableDatatypeForExpressionValue, is, is, isNot, isNot, valuepublic BooleanArrayColumn(RowDefinition row, boolean[] field)
row - the row containing the fieldfield - the field representing the columnpublic BooleanArrayColumn(RowDefinition row, DBBooleanArray field)
row - the row containing the fieldfield - the field representing the columnpublic String toSQLString(DBDefinition db)
DBExpressionThis is only used internally.
If you are extending DBvolution and adding a new function this is the place to format the information for use in SQL. A DBDefinition instance is provided to supply context and so your SQL can used on multiple database engines.
toSQLString in interface DBExpressiontoSQLString in class BooleanArrayExpressiondb - the target database
Support DBvolution at Patreon
public BooleanArrayColumn copy()
DBExpressionImmutability in DBvolution is maintain by internally copying objects.
This method enables immutability by performing a deep copy of the object.
Singletons may return themselves but all other objects must return a new instance with copies of all mutable fields.
Support DBvolution at Patreon
copy in interface DBExpressioncopy in interface BooleanArrayResultcopy in class BooleanArrayExpressionDBValuepublic AbstractColumn getColumn()
ColumnProviderSupport DBvolution at Patreon
getColumn in interface ColumnProviderpublic Set<DBRow> getTablesInvolved()
DBExpressionUsed by QueryGraph to plot the connections between tables and avoid cartesian joins.
Support DBvolution at Patreon
getTablesInvolved in interface DBExpressiongetTablesInvolved in class BooleanArrayExpressionpublic void setUseTableAlias(boolean useTableAlias)
ColumnProvider
the standard implementation is
this.column.setUseTableAlias(useTableAlias); and passes the boolean
along to the underlying AbstractColumn
setUseTableAlias in interface ColumnProvideruseTableAlias - true or falsepublic boolean isPurelyFunctional()
DBExpressionPurely functional expressions use only in-built functions or literal values to produce results and do not require data from tables.
Some databases, notably MS SQLServer, can not group purely functional expressions.
Support DBvolution at Patreon
isPurelyFunctional in interface DBExpressionisPurelyFunctional in class BooleanArrayExpressionpublic boolean isAggregator()
DBExpressionSubclasses must implement this method returning TRUE if the expression will combine the results of several rows to produce a result. If the expression relies on subexpressions, then the isAggregator method must return TRUE if the subexpressions include an aggregator.
Aggregators collect several rows together to produce a single result. Examples are MAX, MIN, and AVERAGE.
They are only appropriate in the SELECT clause and generally require the GROUP BY clause to be useful.
Aggregators are used with DBReport. Aggregator expressions are
included in the SELECT clause but excluded from the GROUP BY clause.
Support DBvolution at Patreon
isAggregator in interface DBExpressionisAggregator in class BooleanArrayExpressionpublic BooleanExpression is(DBBooleanArray boolArrayColumn)
boolArrayColumn - the column to compare to
Support DBvolution at Patreon
Copyright © 2017. All Rights Reserved.