Uses of Class
com.mckoi.database.Variable
-
Packages that use Variable Package Description com.mckoi.database The core database classes for Mckoi.com.mckoi.database.interpret com.mckoi.database.sql These classes parse SQL statements in Mckoi. -
-
Uses of Variable in com.mckoi.database
Fields in com.mckoi.database declared as Variable Modifier and Type Field Description private Variable[]
SubsetColumnTable. aliases
The resolved Variable aliases for this subset.private Variable[]
QueryPlan.DistinctNode. columns
The list of columns to be distinct.private Variable[]
QueryPlan.GroupNode. columns
The columns to group by.private Variable[]
QueryPlan.MultiColumnEquiSelectNode. columns
The list of columns to select the range of.private Variable[]
QueryPlan.SortNode. columns
The list of columns to sort.private Variable
QueryPlan.GroupNode. group_max_column
The group max column.private Variable[]
QueryPlan.EquiJoinNode. left_columns
The columns in the left table.private Variable[]
QueryPlan.NonCorrelatedAnyAllNode. left_columns
The columns in the left table.private Variable
QueryPlan.JoinNode. left_var
The variable in the left table to be joined.private Variable
QueryPlan.SimpleSelectNode. left_var
The LHS variable.private Variable[]
QueryPlan.SubsetNode. new_column_names
New names to assign the columns.private Variable[]
QueryPlan.SubsetNode. original_columns
The original columns in the child that we are to make the subset of.private Variable[]
QueryPlan.EquiJoinNode. right_columns
The columns in the right table.private Variable
Assignment. variable
The Variable that is the lhs of the assignment.private Variable
CorrelatedVariable. variable
The Variable reference itself.Methods in com.mckoi.database that return Variable Modifier and Type Method Description Variable[]
QueryPlan.SubsetNode. getNewColumnNames()
Returns the list of new column names that represent the new columns in this subset.Variable[]
QueryPlan.SubsetNode. getOriginalColumns()
Returns the list of original columns that represent the mappings from the columns in this subset.Variable
CompositeTable. getResolvedVariable(int column)
Variable
DataTable. getResolvedVariable(int column)
Variable
DataTableFilter. getResolvedVariable(int column)
Returns a fully qualified Variable object that represents the name of the column at the given index.Variable
DefaultDataTable. getResolvedVariable(int column)
Returns a fully qualified Variable object that represents the name of the column at the given index.Variable
FilterTable. getResolvedVariable(int column)
Returns a fully qualified Variable object that represents the name of the column at the given index.Variable
JoinedTable. getResolvedVariable(int column)
Returns a fully qualified Variable object that represents the name of the column at the given index.Variable
ReferenceTable. getResolvedVariable(int column)
Returns a fully qualified Variable object that represents the name of the column at the given index.Variable
SubsetColumnTable. getResolvedVariable(int column)
Returns a fully qualified Variable object that represents the name of the column at the given index.abstract Variable
Table. getResolvedVariable(int column)
Returns a fully qualified Variable object that represents the name of the column at the given index.Variable
TableAccessState. getResolvedVariable(int column)
Returns the TableName of the given column of this table.Variable
Assignment. getVariable()
Returns the variable for this assignment.Variable
CorrelatedVariable. getVariable()
Returns the wrapped Variable.Variable
Expression. getVariable()
Returns the Variable if this expression evaluates to a single variable, otherwise returns null.static Variable
Variable. resolve(TableName tname, java.lang.String name)
Attempts to resolve a string '[table_name].[column]' to a Variable instance.static Variable
Variable. resolve(java.lang.String name)
Attempts to resolve a string '[table_name].[column]' to a Variable instance.Variable
Variable. resolveTableName(TableName tablen)
Returns a ColumnName that is resolved against a table name context only if the ColumnName is unknown in this object.private Variable
TemporaryTable. resolveToVariable(java.lang.String col_name)
Resolves the given column name (eg 'id' or 'Customer.id' or 'APP.Customer.id') to a column in this table.Variable
Variable. set(Variable from)
Sets this Variable object with information from the given Variable.Methods in com.mckoi.database with parameters of type Variable Modifier and Type Method Description (package private) static Table
TableFunctions. anyAllNonCorrelated(Table left_table, Variable[] left_vars, Operator op, Table right_table)
The function for a non-correlated ANY or ALL sub-query operation between a left and right branch.boolean
Database. canUserInsertIntoTableObject(DatabaseQueryContext context, User user, TableName table, Variable[] columns)
Returns true if the user can insert into a table or view with the given name and given columns, otherwise returns false.boolean
Database. canUserSelectFromTableObject(DatabaseQueryContext context, User user, TableName table, Variable[] columns)
Returns true if the user can select from a table or view with the given name and given columns, otherwise returns false.boolean
Database. canUserUpdateTableObject(DatabaseQueryContext context, User user, TableName table, Variable[] columns)
Returns true if the user can update a table or view with the given name and given columns, otherwise returns false.private static void
QueryPlan. cloneArray(Variable[] array)
Convenience, replaces all elements of the array with clone versions of themselves.void
FunctionTable. createGroupMatrix(Variable[] col_list)
Creates a grouping matrix for the given tables.int
Table. fastFindFieldName(Variable col)
A faster way to find a column index given a string column name.private int
Table.TableVariableResolver. findColumnName(Variable variable)
private int
TableDataConglomerate.TableRowVariableResolver. findColumnName(Variable variable)
int
CompositeTable. findFieldName(Variable v)
int
DataTable. findFieldName(Variable v)
int
DataTableFilter. findFieldName(Variable v)
Given a fully qualified variable field name, ie.int
DefaultDataTable. findFieldName(Variable v)
Given a fully qualified variable field name, ie.int
FilterTable. findFieldName(Variable v)
Given a fully qualified variable field name, ie.int
JoinedTable. findFieldName(Variable v)
Given a fully qualified variable field name, ie.int
ReferenceTable. findFieldName(Variable v)
Given a fully qualified variable field name, ie.int
SubsetColumnTable. findFieldName(Variable v)
Given a fully qualified variable field name, ie.abstract int
Table. findFieldName(Variable v)
Given a fully qualified variable field name, ie.TType
Table. getTTypeForColumn(Variable v)
Returns a TType object that would represent values in the given column.Table
FunctionTable. mergeWithReference(Variable max_column)
Returns a Table that is this function table merged with the cross reference table.VirtualTable
Table. orderByColumn(Variable column)
VirtualTable
Table. orderByColumn(Variable column, boolean ascending)
Table
Table. rangeSelect(Variable col_var, SelectableRange[] ranges)
A single column range select on this table.TObject
FunctionTable.TableGroupResolver. resolve(Variable variable, int set_index)
TObject
FunctionTable.TableGroupResolver.TableGVResolver. resolve(Variable variable)
TObject
GroupResolver. resolve(Variable variable, int set_index)
Returns the value of a variable of a group.TObject
RowData.RDVariableResolver. resolve(Variable variable)
TObject
Table.TableVariableResolver. resolve(Variable variable)
TObject
TableDataConglomerate.TableRowVariableResolver. resolve(Variable variable)
TObject
VariableResolver. resolve(Variable variable)
Returns the value of a given variable.TType
FunctionTable.TableGroupResolver.TableGVResolver. returnTType(Variable variable)
TType
RowData.RDVariableResolver. returnTType(Variable variable)
TType
Table.TableVariableResolver. returnTType(Variable variable)
TType
TableDataConglomerate.TableRowVariableResolver. returnTType(Variable variable)
TType
VariableResolver. returnTType(Variable variable)
Returns the TType of object the given variable is.Variable
Variable. set(Variable from)
Sets this Variable object with information from the given Variable.void
SubsetColumnTable. setColumnMap(int[] mapping, Variable[] aliases)
Adds a column map into this table.Table
Table. simpleJoin(QueryContext context, Table table, Variable lhs_var, Operator op, Expression rhs)
A simple join operation.Table
Table. simpleSelect(QueryContext context, Variable lhs_var, Operator op, Expression rhs)
A simple select on this table.private boolean
Database. userHasTableObjectGrant(DatabaseQueryContext context, User user, TableName table_name, Variable[] columns, int grant)
Returns true if the grant manager permits a table object operation (eg, SELECT, INSERT, UPDATE, DELETE and COMPACT table operations) for the given user.Constructors in com.mckoi.database with parameters of type Variable Constructor Description Assignment(Variable variable, Expression expression)
Constructs the assignment.CorrelatedVariable(Variable variable, int level_offset)
Constructs the CorrelatedVariable.DistinctNode(QueryPlanNode child, Variable[] columns)
EquiJoinNode(QueryPlanNode left, QueryPlanNode right, Variable[] left_cols, Variable[] right_cols)
GroupNode(QueryPlanNode child, Variable[] columns, Variable group_max_column, Expression[] function_list, java.lang.String[] name_list)
Groups over the given columns from the child.GroupNode(QueryPlanNode child, Variable group_max_column, Expression[] function_list, java.lang.String[] name_list)
Groups over the entire child (always ends in 1 result in set).JoinNode(QueryPlanNode left, QueryPlanNode right, Variable left_var, Operator join_op, Expression right_expression)
MultiColumnEquiSelectNode(QueryPlanNode child, Variable[] columns, Expression[] values)
NonCorrelatedAnyAllNode(QueryPlanNode left, QueryPlanNode right, Variable[] left_vars, Operator subquery_op)
SimpleSelectNode(QueryPlanNode child, Variable left_var, Operator op, Expression right_expression)
SortNode(QueryPlanNode child, Variable[] columns, boolean[] ascending)
SubsetNode(QueryPlanNode child, Variable[] original_columns, Variable[] new_column_names)
Variable(Variable v)
-
Uses of Variable in com.mckoi.database.interpret
Fields in com.mckoi.database.interpret declared as Variable Modifier and Type Field Description private Variable[]
Insert. col_var_list
The list of Variable objects the represent the list of columns being inserted into in this query.Variable
TableSelectExpression. group_max
The group max variable or null if no group max.Variable
SelectColumn. internal_name
The name of this column used internally to reference it.Variable
ByColumn. name
The name of the column in the 'by'.private Variable[]
Select. order_cols
The list of columns in the 'order_by' clause fully resolved.Variable
SelectColumn. resolved_name
The fully resolved name that this column is given in the resulting table.private Variable
Planner.QueryTableSetPlanner.ComplexSingleExpressionPlan. single_var
private Variable
Planner.QueryTableSetPlanner.SimplePatternExpressionPlan. single_var
private Variable
Planner.QueryTableSetPlanner.SimpleSelectExpressionPlan. single_var
private Variable
Planner.QueryTableSetPlanner.SimpleSingleExpressionPlan. single_var
(package private) Variable
Planner.QueryTableSetPlanner.SingleVarPlan. single_var
private Variable[]
Planner.PlanTableSource. var_list
The list of fully qualified Variable objects that are accessable within this plan.(package private) Variable
Planner.QueryTableSetPlanner.SingleVarPlan. variable
private Variable[]
FromTableSubQuerySource. vars
The list of all variable names in the resultant source.Methods in com.mckoi.database.interpret that return Variable Modifier and Type Method Description (package private) Variable
Planner.QuerySelectColumnSet. addHiddenFunction(java.lang.String fun_alias, Expression function, QueryContext context)
Adds a new hidden function into the column set.Variable[]
FromTableDirectSource. allColumns()
Variable[]
FromTableInterface. allColumns()
Returns an array of Variable objects that references each column available in this table set item in order from left column to right column.Variable[]
FromTableSubQuerySource. allColumns()
Variable[]
TableExpressionFromSet. generateResolvedVariableList()
Returns a Variable[] array for each variable that is exposed in this from set.private Variable
TableExpressionFromSet. resolveAssignmentReference(Variable v)
Resolves the given Variable object to an assignment if it's possible to do so within the context of this set.Variable
FromTableDirectSource. resolveColumn(java.lang.String catalog, java.lang.String schema, java.lang.String table, java.lang.String column)
Variable
FromTableInterface. resolveColumn(java.lang.String catalog, java.lang.String schema, java.lang.String table, java.lang.String column)
Returns a Variable that is a fully resolved form of the given column in this table set.Variable
FromTableSubQuerySource. resolveColumn(java.lang.String catalog, java.lang.String schema, java.lang.String table, java.lang.String column)
(package private) Variable
Statement. resolveColumn(Variable v)
Attempts to resolve an ambiguous column name such as 'id' into a Variable from the tables in this statement.(package private) Variable
TableExpressionFromSet. resolveReference(Variable v)
Resolves the given Variable object to a fully resolved Variable within the context of this table expression.(package private) Variable
TableExpressionFromSet. resolveTableColumnReference(Variable v)
Resolves the given Variable against the table columns in this from set.Variable
Statement. resolveVariableName(Variable v)
Given a Variable object, this will resolve the name into a column name the database understands (substitutes aliases, etc).Methods in com.mckoi.database.interpret with parameters of type Variable Modifier and Type Method Description private void
Planner.QueryTableSetPlanner. addSingleVarPlanTo(java.util.ArrayList list, Planner.PlanTableSource table, Variable variable, Variable single_var, Expression[] exp_parts, Operator op)
Adds a single var plan to the given list.boolean
Planner.PlanTableSource. containsVariable(Variable v)
Returns true if this table source contains the variable reference.(package private) Expression
TableExpressionFromSet. dereferenceAssignment(Variable v)
Dereferences a fully qualified reference that is within this set.(package private) boolean
Statement. existsTableWithColumn(Variable column_name)
Given a fully resolved table name ( eg.void
TableExpressionFromSet. exposeVariable(Variable v)
Adds a variable in this from set that is exposed to the outside.Planner.PlanTableSource
Planner.QueryTableSetPlanner. findTableSource(Variable ref)
Finds and returns the PlanTableSource in the list of tables that contains the given Variable reference.(package private) FromTableInterface
Statement. findTableWithColumn(Variable column_name)
Given a fully resolved table name ( eg.(package private) CorrelatedVariable
TableExpressionFromSet. globalResolveReference(int level, Variable v)
Resolves the given Variable reference within the chained list of TableExpressionFromSet objects to a CorrelatedVariable.private boolean
FromTableSubQuerySource. matchesVar(Variable v, java.lang.String catalog, java.lang.String schema, java.lang.String table, java.lang.String column)
If the given Variable matches the reference then this method returns true.(package private) java.lang.Object
TableExpressionFromSet. qualifyVariable(Variable v_in)
Attempts to qualify the given Variable object to a value found either in this from set, or a value in the parent from set.(package private) java.util.ArrayList
Statement. resolveAgainstAliases(Variable alias_name)
Overwrite this method if your statement has some sort of column aliasing capability (such as a select statement).private Variable
TableExpressionFromSet. resolveAssignmentReference(Variable v)
Resolves the given Variable object to an assignment if it's possible to do so within the context of this set.(package private) Variable
Statement. resolveColumn(Variable v)
Attempts to resolve an ambiguous column name such as 'id' into a Variable from the tables in this statement.(package private) Variable
TableExpressionFromSet. resolveReference(Variable v)
Resolves the given Variable object to a fully resolved Variable within the context of this table expression.(package private) Variable
TableExpressionFromSet. resolveTableColumnReference(Variable v)
Resolves the given Variable against the table columns in this from set.Variable
Statement. resolveVariableName(Variable v)
Given a Variable object, this will resolve the name into a column name the database understands (substitutes aliases, etc).private static void
Planner. substituteAliasedVariable(Variable v, java.util.ArrayList s_col_list)
Constructors in com.mckoi.database.interpret with parameters of type Variable Constructor Description ComplexSingleExpressionPlan(Variable v, Expression e)
PlanTableSource(QueryPlanNode plan, Variable[] var_list, java.lang.String[] table_unique_names)
Constructor.SimplePatternExpressionPlan(Variable v, Expression e)
SimpleSelectExpressionPlan(Variable v, Operator op, Expression e)
SimpleSingleExpressionPlan(Variable v, Expression e)
-
Uses of Variable in com.mckoi.database.sql
Methods in com.mckoi.database.sql that return Variable Modifier and Type Method Description Variable
SQL. ColumnNameVariable()
Variable
SQL. GroupMaxColumn()
NOTE: This is an extension, allows for us to specify a column to return the max value for each row representing a group.
-