IList <InputParameterExpression> BuildExpressionParameters(ExpressionChain expressions, QueryContext queryContext)
        {
            var builderContext     = new BuilderContext(queryContext);
            var previousExpression = ExpressionDispatcher.CreateTableExpression(expressions.Expressions[0], builderContext);

            previousExpression = BuildExpressionQuery(expressions, previousExpression, builderContext);
            BuildOffsetsAndLimits(builderContext);
            // then prepare Parts for SQL translation
            PrepareSqlOperands(builderContext);
            return(builderContext.ExpressionQuery.Parameters);
        }
        /// <summary>
        /// Builds and chains the provided Expressions
        /// </summary>
        /// <param name="expressions"></param>
        /// <param name="builderContext"></param>
        protected virtual void BuildExpressionQuery(ExpressionChain expressions, BuilderContext builderContext)
        {
            var previousExpression = ExpressionDispatcher.CreateTableExpression(expressions.Expressions[0], builderContext);

            previousExpression = BuildExpressionQuery(expressions, previousExpression, builderContext);
            BuildOffsetsAndLimits(builderContext);
            // then prepare Parts for SQL translation
            PrepareSqlOperands(builderContext);
            // now, we optimize anything we can
            OptimizeQuery(builderContext);
            // finally, compile our object creation method
            CompileRowCreator(builderContext);
            // in the very end, we keep the SELECT clause
            builderContext.ExpressionQuery.Select = builderContext.CurrentSelect;
        }