public Enumerator(DbQueryCommandBatchExecutable parent)
 {
     this.parent = parent;
     this.parent.executor.LogCommand(this.parent.query);
     this.parent.executor.StartUsingConnection();
     this.command = this.parent.executor.GetCommand(this.parent.query);
     this.command.Prepare();
     this.paramSet = -1;
 }
Esempio n. 2
0
            public override IEnumerable <int> ExecuteBatch(QueryCommand query, IEnumerable <object[]> paramSets, int batchSize, bool stream)
            {
                var batch = new DbQueryCommandBatchExecutable(this, query, paramSets.ToArray());

                if (stream == false)
                {
                    return(new EnumerableBuffered <int>(batch));
                }
                else
                {
                    return(batch);
                }
            }