DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | Private Attributes | List of all members
Deveel.Data.Sql.Query.QueryPlanner.QueryExpressionPreparer Class Reference
Inheritance diagram for Deveel.Data.Sql.Query.QueryPlanner.QueryExpressionPreparer:
Deveel.Data.Sql.Expressions.IExpressionPreparer

Public Member Functions

 QueryExpressionPreparer (QueryPlanner planner, QueryExpressionFrom parent, IRequest context)
 
bool CanPrepare (SqlExpression expression)
 Verifies whether the instance of the interface can prepare the given expression. More...
 
SqlExpression Prepare (SqlExpression expression)
 Returns the new translated object to be mutated from the given expression. More...
 

Private Attributes

readonly QueryPlanner planner
 
readonly QueryExpressionFrom parent
 
readonly IRequest context
 

Detailed Description

Definition at line 636 of file QueryPlanner.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Query.QueryPlanner.QueryExpressionPreparer.QueryExpressionPreparer ( QueryPlanner  planner,
QueryExpressionFrom  parent,
IRequest  context 
)
inline

Definition at line 641 of file QueryPlanner.cs.

641  {
642  this.planner = planner;
643  this.parent = parent;
644  this.context = context;
645  }

Member Function Documentation

bool Deveel.Data.Sql.Query.QueryPlanner.QueryExpressionPreparer.CanPrepare ( SqlExpression  expression)
inline

Verifies whether the instance of the interface can prepare the given expression.

Parameters
expressionThe expression object to verify.
Returns
Returns true if this preparer will prepare the given object in an expression.

Implements Deveel.Data.Sql.Expressions.IExpressionPreparer.

Definition at line 647 of file QueryPlanner.cs.

647  {
648  return expression is SqlQueryExpression;
649  }
SqlExpression Deveel.Data.Sql.Query.QueryPlanner.QueryExpressionPreparer.Prepare ( SqlExpression  expression)
inline

Returns the new translated object to be mutated from the given expression.

Parameters
expression
Returns

Implements Deveel.Data.Sql.Expressions.IExpressionPreparer.

Definition at line 651 of file QueryPlanner.cs.

651  {
652  var queryExpression = (SqlQueryExpression) expression;
653  var queryFrom = QueryExpressionFrom.Create(context, queryExpression);
654  queryFrom.Parent = parent;
655  var plan = planner.PlanQuery(context, queryExpression, queryFrom, null, null);
656  return SqlExpression.Constant(new DataObject(new QueryType(), new SqlQueryObject(new CachePointNode(plan))));
657  }
Represents a dynamic object that encapsulates a defined SqlType and a compatible constant ISqlObject ...
Definition: DataObject.cs:35
Defines the base class for instances that represent SQL expression tree nodes.
static SqlConstantExpression Constant(object value)
IQueryPlanNode PlanQuery(QueryInfo queryInfo)

Member Data Documentation

readonly IRequest Deveel.Data.Sql.Query.QueryPlanner.QueryExpressionPreparer.context
private

Definition at line 639 of file QueryPlanner.cs.

readonly QueryExpressionFrom Deveel.Data.Sql.Query.QueryPlanner.QueryExpressionPreparer.parent
private

Definition at line 638 of file QueryPlanner.cs.

readonly QueryPlanner Deveel.Data.Sql.Query.QueryPlanner.QueryExpressionPreparer.planner
private

Definition at line 637 of file QueryPlanner.cs.


The documentation for this class was generated from the following file: