public Task <IQueryResult <T> > Run <T>(Query q, RowParser <T, TRow> p)
 {
     return(Run(q, p, _ct));
 }
 public Task <IQueryResult <T> > Run <T>(Query q, RowParser <T, TRow> p, CancellationToken ct)
 {
     return(_runner.RunInternal(_connection, q, p, ct, () => Task.CompletedTask));
 }
 public Task <T> RunSingle <T>(Query q, RowParser <T, TRow> p)
 {
     return(RunSingle(q, p, _ct));
 }
 public Task <T> RunSingle <T>(Query q, RowParser <T, TRow> p, CancellationToken ct)
 {
     return(_runner.RunSingleInternal(_connection, q, p, ct));
 }
示例#5
0
 protected override Task <T> Single <T>(DbDataReader result, RowParser <T, IDataRecord> parser, CancellationToken ct)
 {
     return(ParseSingle(result, parser, ct));
 }
示例#6
0
 protected override IQueryResult <T> Enumerate <T>(DbDataReader result, RowParser <T, IDataRecord> parser, CancellationToken ct, Func <Task> onComplete)
 {
     return(new DataReaderQueryResult <T>(result, parser, ct, onComplete));
 }
示例#7
0
 public IQueryResult <T> AllRecords <T>(RowParser <T, IDataRecord> parser)
 {
     return(new DataReaderQueryResult <T>(_reader, parser, _ct, () => Task.CompletedTask));
 }
示例#8
0
 public DataReaderQueryResult(DbDataReader reader, RowParser <T, IDataRecord> parser, CancellationToken ct, Func <Task> onComplete)
 {
     _reader     = reader;
     _enumerator = new DataReaderParsingEnumerator <T>(reader, parser, ct, onComplete);
 }
示例#9
0
 public Task <T> SingleRecord <T>(RowParser <T, IDataRecord> parser)
 {
     return(DataReaderRunner.ParseSingle(_reader, parser, _ct));
 }
示例#10
0
 protected abstract IQueryResult <T> Enumerate <T>(DbDataReader result, RowParser <T, TRow> parser, CancellationToken ct, Func <Task> onComplete);
示例#11
0
        public async Task <IQueryResult <T> > Run <T>(Query q, RowParser <T, TRow> p, CancellationToken ct)
        {
            var c = await _connectionProvider();

            return(await RunInternal(c, q, p, ct, async() => { await _connectionDisposer(c); }));
        }
示例#12
0
 protected abstract Task <T> Single <T>(DbDataReader result, RowParser <T, TRow> parser, CancellationToken ct);
示例#13
0
 public Task <T> RunSingle <T>(Query q, RowParser <T, TRow> p, CancellationToken ct)
 {
     return(WithConnection(c => RunSingleInternal(c, q, p, ct)));
 }