// Constructors

        public UserQueryRequest(SqlCompilationResult compiledStatement, IEnumerable <QueryParameterBinding> parameterBindings)
        {
            ArgumentValidator.EnsureArgumentNotNull(compiledStatement, "compiledStatement");
            ArgumentValidator.EnsureArgumentNotNull(parameterBindings, "parameterBindings");

            this.compiledStatement = compiledStatement;
            ParameterBindings      = ParameterBinding.NormalizeBindings(parameterBindings);
        }
示例#2
0
        /// <summary>
        /// Builds request using specified <paramref name="compiledQuery"/> and <paramref name="bindings"/>.
        /// </summary>
        /// <returns>Built request.</returns>
        public QueryRequest CreateRequest(SqlCompilationResult compiledQuery, IEnumerable <QueryParameterBinding> bindings)
        {
            ArgumentValidator.EnsureArgumentNotNull(compiledQuery, "compiledQuery");
            ArgumentValidator.EnsureArgumentNotNull(bindings, "bindings");

            return(new QueryRequest(new UserQueryRequest(
                                        compiledQuery,
                                        bindings.Select(b => b.RealBinding))));
        }
 public void Prepare()
 {
     if (compiledStatement != null)
     {
         return;
     }
     compiledStatement = (NodeConfiguration != null)
 ? driver.Compile(CompileUnit, NodeConfiguration)
 : driver.Compile(CompileUnit);
     CompileUnit = null;
     Statement   = null;
 }
示例#4
0
 public void Prepare()
 {
     if (compiledStatement != null && accessor != null)
     {
         return;
     }
     compiledStatement = (NodeConfiguration != null)
 ? driver.Compile(Statement, NodeConfiguration)
 : driver.Compile(Statement);
     accessor  = driver.GetDataReaderAccessor(TupleDescriptor);
     Statement = null;
 }