18 using System.Collections.Generic;
20 namespace Deveel.Data.Sql.Expressions {
25 this.preparer = preparer;
29 if (preparer.CanPrepare(expression))
30 expression = preparer.
Prepare(expression);
32 return base.Visit(expression);
37 if (reference != null)
38 reference = reference.
Prepare(preparer);
41 if (valueExpression != null)
42 valueExpression = valueExpression.
Prepare(preparer);
49 var newList =
new List<T>();
50 foreach (var item
in list) {
52 if (newItem != null) {
53 newItem = (T)newItem.
Prepare(preparer);
59 return newList.ToArray();
68 where = where.
Prepare(preparer);
70 newExpression.WhereExpression = where;
74 having = having.
Prepare(preparer);
76 newExpression.HavingExpression = having;
85 if (nextComposite != null)
IEnumerable< SelectColumn > SelectColumns
SqlExpression ValueExpression
override SqlExpression VisitQuery(SqlQueryExpression query)
override SqlExpression VisitAssign(SqlAssignExpression assign)
PreparerVisitor(IExpressionPreparer preparer)
SqlQueryExpression NextComposite
static SqlAssignExpression Assign(SqlExpression reference, SqlExpression valueExpression)
override SqlExpression Visit(SqlExpression expression)
Visits a given SQL expression.
A container for the FROM clause of a select statement.
readonly IExpressionPreparer preparer
An interface used to prepare a SqlExpression object.
virtual SqlExpression Prepare(IExpressionPreparer preparer)
object Prepare(IExpressionPreparer preparer)
Converts the underlying value of this instance into an object that can be evaluated by an expression...
Defines the base class for instances that represent SQL expression tree nodes.
SqlExpression HavingExpression
A visitor for SqlExpression objects.
A contract for objects that participate to a SqlExpression.Prepare phase of an expression evaluation...
SqlExpression WhereExpression
SqlExpression ReferenceExpression