public IQueryHandler <TResult> BuildHandler <TResult>(IMartenSession session, Statement statement, Statement currentStatement) { var selector = new SerializationSelector <T>(session.Serializer); return(LinqHandlerBuilder.BuildHandler <T, TResult>(selector, statement)); }
public Task <TResult> ExecuteAsync <TResult>(Expression expression, CancellationToken token, ResultOperatorBase op) { var builder = new LinqHandlerBuilder(this, _session, expression, op); var handler = builder.BuildHandler <TResult>(); return(ExecuteHandlerAsync(handler, token)); }
public IQueryHandler <TResult> BuildHandler <TResult>(IMartenSession session, Statement statement, Statement currentStatement) { var selector = (ISelector <T>)BuildSelector(session); return(LinqHandlerBuilder.BuildHandler <T, TResult>(selector, statement)); }
public Task <TResult> ExecuteAsync <TResult>(Expression expression, CancellationToken token) { var builder = new LinqHandlerBuilder(_session, expression); var handler = builder.BuildHandler <TResult>(Statistics); return(ExecuteHandlerAsync(handler, token)); }
public TResult Execute <TResult>(Expression expression, ResultOperatorBase op) { var builder = new LinqHandlerBuilder(this, _session, expression, op); var handler = builder.BuildHandler <TResult>(); return(ExecuteHandler(handler)); }
public TResult Execute <TResult>(Expression expression) { var builder = new LinqHandlerBuilder(_session, expression); var handler = builder.BuildHandler <TResult>(Statistics); return(ExecuteHandler(handler)); }
public Task <TResult> ExecuteAsync <TResult>(Expression expression, CancellationToken token) { var builder = new LinqHandlerBuilder(this, expression); var handler = builder.BuildHandler <TResult>(); // TODO -- worry about QueryStatistics later return(executeHandlerAsync(handler, null, token)); }
public TResult Execute <TResult>(Expression expression) { var builder = new LinqHandlerBuilder(this, expression); var handler = builder.BuildHandler <TResult>(); // TODO -- worry about QueryStatistics later return(executeHandler(handler, null)); }
public async Task <TResult> ExecuteAsync <TResult>(Expression expression, CancellationToken token) { var builder = new LinqHandlerBuilder(this, _session, expression); var handler = builder.BuildHandler <TResult>(); await ensureStorageExistsAsync(builder, token).ConfigureAwait(false); return(await ExecuteHandlerAsync(handler, token).ConfigureAwait(false)); }
public TResult Execute <TResult>(Expression expression) { var builder = new LinqHandlerBuilder(this, _session, expression); var handler = builder.BuildHandler <TResult>(); ensureStorageExists(builder); return(ExecuteHandler(handler)); }
public async Task <int> StreamJson <TResult>(Stream stream, Expression expression, CancellationToken token, ResultOperatorBase op) { var builder = new LinqHandlerBuilder(this, _session, expression, op); var handler = builder.BuildHandler <TResult>(); var cmd = _session.BuildCommand(handler); using var reader = await _session.ExecuteReaderAsync(cmd, token).ConfigureAwait(false); return(await handler.StreamJson(stream, reader, token).ConfigureAwait(false)); }
public async Task <TResult> ExecuteAsync <TResult>(Expression expression, CancellationToken token, ResultOperatorBase op) { try { var builder = new LinqHandlerBuilder(this, _session, expression, op); var handler = builder.BuildHandler <TResult>(); await ensureStorageExistsAsync(builder, token).ConfigureAwait(false); return(await ExecuteHandlerAsync(handler, token).ConfigureAwait(false)); } catch (Exception e) { MartenExceptionTransformer.WrapAndThrow(e); } return(default);
public IQueryHandler <TResult> BuildHandler <TResult>(IMartenSession session, Statement statement, Statement currentStatement) { return(LinqHandlerBuilder.BuildHandler <string, TResult>(this, statement)); }
public IQueryHandler <T> BuildHandler <T>(IMartenSession session, Statement topStatement, Statement currentStatement) { return(LinqHandlerBuilder.BuildHandler <IEvent, T>(this, topStatement)); }
internal IQueryHandler <TResult> BuildHandler <TResult>(ResultOperatorBase?op = null) { var builder = new LinqHandlerBuilder(MartenProvider, Session, Expression, op); return(builder.BuildHandler <TResult>()); }
internal IQueryHandler <TResult> BuildHandler <TResult>(ResultOperatorBase op = null) { var builder = new LinqHandlerBuilder(_session, Expression, op); return(builder.BuildHandler <TResult>(Statistics)); }