Prepare() public method

public Prepare ( IExpressionPreparer preparer ) : SqlExpression
preparer IExpressionPreparer
return SqlExpression
Beispiel #1
0
        private SqlExpression PrepareSearchExpression(IQueryContext context, QueryExpressionFrom queryFrom, SqlExpression expression)
        {
            // first check the expression is not null
            if (expression == null)
                return null;

            // This is used to prepare sub-queries and qualify variables in a
            // search expression such as WHERE or HAVING.

            // Prepare the sub-queries first
            expression = expression.Prepare(new QueryExpressionPreparer(this, queryFrom, context));

            // Then qualify all the variables.  Note that this will not qualify
            // variables in the sub-queries.
            expression = expression.Prepare(queryFrom.ExpressionPreparer);

            return expression;
        }