Package com.mckoi.database.interpret
Class FromTableSubQuerySource
java.lang.Object
com.mckoi.database.interpret.FromTableSubQuerySource
- All Implemented Interfaces:
FromTableInterface
An implementation of FromTableInterface that wraps around a
TableSelectExpression object as a sub-query source.
- Author:
- Tobias Downer
-
Constructor Summary
ConstructorsConstructorDescriptionFromTableSubQuerySource
(DatabaseConnection connection, String unique_key, TableSelectExpression table_expression, com.mckoi.database.interpret.TableExpressionFromSet from_set, TableName aliased_table_name) Constructs the source. -
Method Summary
Modifier and TypeMethodDescriptionVariable[]
Returns an array of Variable objects that references each column available in this table set item in order from left column to right column.Returns the unique name of this source.Returns a unique name given to this table source.boolean
matchesReference
(String catalog, String schema, String table) Returns true if this source will match the given catalog, schema and table.resolveColumn
(String catalog, String schema, String table, String column) Returns a Variable that is a fully resolved form of the given column in this table set.int
resolveColumnCount
(String catalog, String schema, String table, String column) Returns the number of instances we can resolve the given catalog, schema, table and column name to a column or columns within this item.void
setCaseInsensitive
(boolean status) Toggle the case sensitivity flag.
-
Constructor Details
-
FromTableSubQuerySource
public FromTableSubQuerySource(DatabaseConnection connection, String unique_key, TableSelectExpression table_expression, com.mckoi.database.interpret.TableExpressionFromSet from_set, TableName aliased_table_name) Constructs the source.
-
-
Method Details
-
getUniqueKey
Returns the unique name of this source. -
setCaseInsensitive
public void setCaseInsensitive(boolean status) Toggle the case sensitivity flag. -
getUniqueName
Description copied from interface:FromTableInterface
Returns a unique name given to this table source. No other sources will share this identifier string.- Specified by:
getUniqueName
in interfaceFromTableInterface
-
matchesReference
Description copied from interface:FromTableInterface
Returns true if this source will match the given catalog, schema and table. If any arguments are null then it is not included in the match.Used for 'Part.*' type glob searches.
- Specified by:
matchesReference
in interfaceFromTableInterface
-
resolveColumnCount
Description copied from interface:FromTableInterface
Returns the number of instances we can resolve the given catalog, schema, table and column name to a column or columns within this item. Note that if catalog, schema, table or column is 'null' then it means it doesn't matter.For example, say we need to resolve the column 'id' the arguments are null, null, null, "id". This may resolve to multiple columns if there is a mixture of tables with "id" as a column.
Note that parameters of 'null, null, null, null', 'null, null, null, not null', 'null, null, not null, not null', 'null, not null, not null, not null', and 'not null, not null, not null, not null' are only accepted.
- Specified by:
resolveColumnCount
in interfaceFromTableInterface
-
resolveColumn
Description copied from interface:FromTableInterface
Returns a Variable that is a fully resolved form of the given column in this table set. This method does not have to check whether the parameters reference more than one column. If more than one column is referenced, the actual column returned is implementation specific.- Specified by:
resolveColumn
in interfaceFromTableInterface
-
allColumns
Description copied from interface:FromTableInterface
Returns an array of Variable objects that references each column available in this table set item in order from left column to right column.- Specified by:
allColumns
in interfaceFromTableInterface
-