Uses of Class
com.mckoi.database.Expression
-
Packages that use Expression 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 Expression in com.mckoi.database
Fields in com.mckoi.database declared as Expression Modifier and Type Field Description private Expression[]
FunctionTable. exp_list
The list of expressions that are evaluated to form each column.private Expression
Assignment. expression
Set expression that is the rhs of the assignment.private Expression
QueryPlan.ConstantSelectNode. expression
The search expression.private Expression
QueryPlan.ExhaustiveSelectNode. expression
The search expression.private Expression
QueryPlan.FunctionalSelectNode. expression
The function expression (eg.private Expression
QueryPlan.RangeSelectNode. expression
A simple expression that represents the range to select.private Expression
QueryPlan.SimplePatternSelectNode. expression
The search expression.Expression
Transaction.CheckExpression. expression
The expression to check.private Expression[]
QueryPlan.CreateFunctionsNode. function_list
The list of functions to create.private Expression[]
QueryPlan.GroupNode. function_list
Any aggregate functions (or regular function columns) that are to be planned.private static Expression
FunctionFactory. GLOB_EXPRESSION
static Expression[]
FunctionFactory. GLOB_LIST
Represents a function argument * for glob's such as 'count(*)'(package private) Expression
JoiningSet.JoinPart. on_expression
The expression that we are joining on (eg.private Expression[]
AbstractFunction. params
The list of expressions this function has as parameters.private Expression[]
FunctionDef. params
The list of parameters for the function.private Expression
QueryPlan.JoinNode. right_expression
The expression evaluated on the right table.private Expression
QueryPlan.SimpleSelectNode. right_expression
The RHS expression.private Expression[]
QueryPlan.MultiColumnEquiSelectNode. values
The values of the cells to equi-select (must be constant expressions).Methods in com.mckoi.database that return Expression Modifier and Type Method Description Expression
Expression. concat(Expression expr)
Merges an expression with this expression.Expression
DataTableColumnDef. getDefaultExpression(TransactionSystem system)
Expression
Expression. getEndExpression()
Returns the end Expression of this expression.Expression
Assignment. getExpression()
Returns the Expression for this assignment.Expression
JoiningSet. getOnExpression(int n)
Returns the ON Expression for the type of join after table 'n' in the set.Expression
AbstractFunction. getParameter(int n)
Returns the parameter at the given index in the parameters list.Expression[]
FunctionDef. getParameters()
The list of parameters that are passed to the function.static Expression
Expression. parse(java.lang.String expression)
Static method that parses the given string which contains an expression into an Expression object.static Expression
Expression. simple(java.lang.Object ob1, Operator op, java.lang.Object ob2)
Generates a simple expression from two objects and an operator.Expression[]
Expression. split()
Returns an array of two Expression objects that represent the left hand and right and side of the last operator in the post fix notation.Methods in com.mckoi.database with parameters of type Expression Modifier and Type Method Description void
DatabaseConnection. addCheckConstraint(TableName table_name, Expression expression, short deferred, java.lang.String constraint_name)
Same as the Transaction.addCheckConstraint method.void
Transaction. addCheckConstraint(TableName table_name, Expression expression, short deferred, java.lang.String constraint_name)
Adds a check expression that becomes perminent when the transaction is committed.void
JoiningSet. addJoin(int type, Expression on_expression)
Adds a joining type to the set, and an 'on' expression.void
JoiningSet. addPreviousJoin(int type, Expression on_expression)
Hack, add a joining type to the previous entry from the end.Table
Table. all(QueryContext context, Expression lhs, Operator op, Table table)
Evaluates a non-correlated ALL type operator given the LHS expression, the RHS subquery and the ALL operator to use.Table
Table. any(QueryContext context, Expression lhs, Operator op, Table right_table)
Evaluates a non-correlated ANY type operator given the LHS expression, the RHS subquery and the ANY operator to use.private void
QueryPlan.RangeSelectNode. calcRange(QueryContext context, DataTableColumnDef field, SelectableRangeSet range, Expression exp)
Calculates a list of SelectableRange objects that represent the range of the expression.private static void
QueryPlan. cloneArray(Expression[] array)
Convenience, replaces all elements of the array with clone versions of themselves.Expression
Expression. concat(Expression expr)
Merges an expression with this expression.void
Expression. copyTextFrom(Expression e)
Copies the text from the given expression.private java.util.ArrayList
QueryPlan.RangeSelectNode. createAndList(java.util.ArrayList list, Expression exp)
Given an Expression, this will return a list of expressions that can be safely executed as a set of 'and' operations.(package private) TObject
RowData. evaluate(Expression expression, QueryContext context)
Evaluates the expression and returns the object it evaluates to using the local VariableResolver to resolve variables in the expression.Table
Table. exhaustiveSelect(QueryContext context, Expression exp)
Exhaustively searches through this table for rows that match the expression given.(package private) void
DataTableDef. resolveColumns(boolean ignore_case, Expression exp)
Resolves variables in a column so that any unresolved column names point to this table.static Table
FunctionTable. resultTable(DatabaseQueryContext context, Expression expression)
Returns a FunctionTable that has a single Expression evaluated in it.void
DataTableColumnDef. setDefaultExpression(Expression expression)
void
RowData. setupEntire(int[] col_indices, Expression[] exps, QueryContext context)
Sets up an entire row given the array of Expressions and a list of indices to the columns to set.void
DatabaseConnection. setVar(java.lang.String name, Expression exp)
Assigns a variable to the expression for this connection.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 static boolean
DatabaseConnection. toBooleanValue(Expression exp)
Evaluates the expression to a boolean value (true or false).private void
QueryPlan.RangeSelectNode. updateRange(QueryContext context, SelectableRangeSet range, DataTableColumnDef field, Expression e)
Updates a range with the given expression. -
Uses of Expression in com.mckoi.database.interpret
Fields in com.mckoi.database.interpret declared as Expression Modifier and Type Field Description (package private) Expression[]
Show. args
Arguments of the show statement.(package private) Expression
Sequence. cache_value
(package private) Expression
ConstraintDef. check_expression
(package private) Expression
ColumnDef. default_expression
Expression
ByColumn. exp
The expression that we are ordering by.(package private) Expression
Set. exp
The Expression that is the value to assign the variable to (if applicable).private Expression
Planner.QueryTableSetPlanner.ComplexSingleExpressionPlan. expression
private Expression
Planner.QueryTableSetPlanner.ConstantExpressionPlan. expression
private Expression
Planner.QueryTableSetPlanner.ExhaustiveJoinExpressionPlan. expression
private Expression
Planner.QueryTableSetPlanner.ExhaustiveSelectExpressionPlan. expression
private Expression
Planner.QueryTableSetPlanner.ExhaustiveSubQueryExpressionPlan. expression
private Expression
Planner.QueryTableSetPlanner.SimplePatternExpressionPlan. expression
private Expression
Planner.QueryTableSetPlanner.SimpleSelectExpressionPlan. expression
private Expression
Planner.QueryTableSetPlanner.SimpleSingleExpressionPlan. expression
private Expression
Planner.QueryTableSetPlanner.SimpleSubQueryExpressionPlan. expression
(package private) Expression
Planner.QueryTableSetPlanner.SingleVarPlan. expression
private Expression
Planner.QueryTableSetPlanner.StandardJoinExpressionPlan. expression
private Expression
Planner.QueryTableSetPlanner.SubLogicExpressionPlan. expression
Expression
SelectColumn. expression
The expression of this column.(package private) Expression
Sequence. increment
(package private) Expression
Planner.PlanTableSource. left_on_expr
(package private) Expression
Sequence. max_value
(package private) Expression
Sequence. min_value
(package private) Expression
ConstraintDef. original_check_expression
(package private) Expression
ColumnDef. original_default_expression
(package private) Expression
Planner.PlanTableSource. right_on_expr
private Expression
SearchExpression. search_expression
The originating expression.(package private) Expression
Sequence. start_value
Methods in com.mckoi.database.interpret that return Expression Modifier and Type Method Description (package private) Expression
TableExpressionFromSet. dereferenceAssignment(Variable v)
Dereferences a fully qualified reference that is within this set.private static Expression
Planner. filterHavingClause(Expression having_expr, java.util.ArrayList aggregate_list, QueryContext context)
Given a HAVING clause expression, this will generate a new HAVING clause expression with all aggregate expressions put into the given extra function list.Expression
SearchExpression. getFromExpression()
Returns the search expression as an Expression object.Expression
FromClause. getOnExpression(int n)
Returns the ON Expression for the type of join after table 'n' in the set.Methods in com.mckoi.database.interpret with parameters of type Expression Modifier and Type Method Description void
TableExpressionFromSet. addFunctionRef(java.lang.String name, Expression expression)
Adds a function resource to the set.(package private) Variable
Planner.QuerySelectColumnSet. addHiddenFunction(java.lang.String fun_alias, Expression function, QueryContext context)
Adds a new hidden function into the column set.void
FromClause. addJoin(int type, Expression on_expression)
Adds a Join to the from clause.void
FromClause. addPreviousJoin(int type, Expression on_expression)
Hack, add a joining type to the previous entry from the end.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.(package private) void
SearchExpression. appendExpression(Expression expression)
Concatinates a new expression to the end of this expression and uses the 'AND' operator to seperate the expressions.(package private) void
ColumnChecker. checkExpression(Expression expression)
Resolves all the variables in the expression throwing a DatabaseException if any errors found.private java.util.ArrayList
Planner.QueryTableSetPlanner. createAndList(java.util.ArrayList list, Expression exp)
Given an Expression, this will return a list of expressions that can be safely executed as a set of 'and' operations.private static Expression
Planner. filterHavingClause(Expression having_expr, java.util.ArrayList aggregate_list, QueryContext context)
Given a HAVING clause expression, this will generate a new HAVING clause expression with all aggregate expressions put into the given extra function list.private void
UserManager. internalCreateUser(DatabaseQueryContext context, java.lang.String username, java.lang.String password_str, Expression[] groups_list, java.lang.String lock_status)
Private method that creates a new user.private void
UserManager. internalSetUserGroupsAndLock(DatabaseQueryContext context, java.lang.String username, Expression[] groups_list, java.lang.String lock_status)
Private method that sets the user groups and lock status.(package private) QueryPlanNode
Planner.QueryTableSetPlanner. logicalEvaluate(Expression exp)
Evaluates a search Expression clause.(package private) void
Planner.QueryTableSetPlanner. planForExpression(Expression exp)
Evaluates the search Expression clause and alters the banches of the plans in this object as necessary.(package private) void
Statement. resolveExpression(Expression exp)
Given an Expression, this will run through the expression and resolve any variable names via the 'resolveVariableName' method here.void
ConstraintDef. setCheck(Expression exp)
Sets object up for a check constraint.void
ColumnDef. setDefaultExpression(Expression exp)
Sets the default expression (this is used to make a new constraint).void
SearchExpression. setFromExpression(Expression expression)
Sets this search expression from the given expression.void
Planner.QueryTableSetPlanner. setJoinInfoBetweenSources(int between_index, int join_type, Expression on_expr)
Links the last added table source to the previous added table source through this joining information.(package private) void
Planner.PlanTableSource. setLeftJoinInfo(Planner.PlanTableSource left_plan, int join_type, Expression on_expr)
Sets the left join information for this plan.(package private) void
Planner.PlanTableSource. setRightJoinInfo(Planner.PlanTableSource right_plan, int join_type, Expression on_expr)
Sets the right join information for this plan.private static void
Planner. substituteAliasedVariables(Expression expression, java.util.ArrayList s_col_list)
Substitutes any aliased variables in the given expression with the function name equivalent.Constructors in com.mckoi.database.interpret with parameters of type Expression Constructor Description ComplexSingleExpressionPlan(Variable v, Expression e)
ConstantExpressionPlan(Expression e)
ExhaustiveJoinExpressionPlan(Expression e)
ExhaustiveSelectExpressionPlan(Expression e)
ExhaustiveSubQueryExpressionPlan(java.util.List vars, Expression e)
SimplePatternExpressionPlan(Variable v, Expression e)
SimpleSelectExpressionPlan(Variable v, Operator op, Expression e)
SimpleSingleExpressionPlan(Variable v, Expression e)
SimpleSubQueryExpressionPlan(Expression e)
StandardJoinExpressionPlan(Expression e)
SubLogicExpressionPlan(Expression e)
-
Uses of Expression in com.mckoi.database.sql
Methods in com.mckoi.database.sql that return Expression Modifier and Type Method Description Expression
SQL. DoExpression()
Expression
SQL. DoNonBooleanExpression()
Expression[]
SQL. ExpressionList()
Expression
SQL. ExpressionTest()
Expression[]
SQL. FunctionParams()
static Expression
Util. normalize(Expression exp)
Normalizes the Expression by removing all NOT operators and altering the expression as appropriate.private static Expression
Util. normalize(Expression exp, boolean inverse)
Normalizes the Expression by removing all NOT operators and altering the expression as appropriate.Expression
SQL. parseExpression()
private static Expression
Util. standardInverse(Expression exp)
Returns an expression that is (exp) = false which is the natural inverse of all expressions.Methods in com.mckoi.database.sql with parameters of type Expression Modifier and Type Method Description void
SQL. addOperatorToExpression(Expression exp, Operator op)
Helper for expression parsing.void
SQL. BetweenPredicate(Expression exp, java.util.Stack stack)
void
SQL. BooleanOperator(Expression exp, java.util.Stack stack)
void
SQL. expEnd(Expression exp, java.util.Stack stack)
Helper for expression parsing.void
SQL. expEndParen(Expression exp, java.util.Stack stack)
Helper for expression parsing.void
SQL. expOperator(Expression exp, java.util.Stack stack, Operator op)
Helper for expression parsing.void
SQL. expression(Expression exp, java.util.Stack stack)
Parse an expression.static java.lang.String
Util. expressionListToString(Expression[] list)
Returns an array of Expression objects as a comma deliminated string.void
SQL. flushOperatorStack(Expression exp, java.util.Stack stack, int precedence)
Flush the operator stack until the stack is either empty or the top element is either a "(" or of a precedence lower than the given precedence.void
SQL. nonBooleanExpression(Expression exp, java.util.Stack stack)
Parses a non-boolean expression.static Expression
Util. normalize(Expression exp)
Normalizes the Expression by removing all NOT operators and altering the expression as appropriate.private static Expression
Util. normalize(Expression exp, boolean inverse)
Normalizes the Expression by removing all NOT operators and altering the expression as appropriate.void
SQL. NumericOperator(Expression exp, java.util.Stack stack)
void
SQL. Operand(Expression exp, java.util.Stack stack)
void
SQL. OpPart(Expression exp, java.util.Stack stack)
static FunctionDef
Util. resolveFunctionName(java.lang.String name, Expression[] exp_list)
Returns a Function object that represents the name and expression list (of parameters) of a function.private static Expression
Util. standardInverse(Expression exp)
Returns an expression that is (exp) = false which is the natural inverse of all expressions.void
SQL. StringOperator(Expression exp, java.util.Stack stack)
void
SQL. SubQueryExpression(Expression exp, java.util.Stack stack)
void
SQL. SubQueryOperator(Expression exp, java.util.Stack stack)
static TObject
Util. toArrayParamObject(Expression[] arr)
Converts an expression array to an array type that can be added to an expression.
-