public abstract Task <T?> LoadAsync(TId id, IMartenSession session, CancellationToken token);
public override void CompileLocal(IMartenSession session) { Inner.CompileStructure(session); Inner = Inner.Top(); }
public abstract void Store(IMartenSession session, T document);
public Task <IStorageOperation> DetermineOperation(IMartenSession session, StreamFragment <TDoc, TId> fragment, CancellationToken cancellation) { return(Task.FromResult(DetermineOperationSync(session, fragment))); }
public void ConfigureCommand(CommandBuilder builder, IMartenSession session) { configure(builder); }
public IIncludeReader BuildReader(IMartenSession session) { var selector = (ISelector <T>)_storage.BuildSelector(session); return(new IncludeReader <T>(_callback, selector)); }
public WhereClauseParser(IMartenSession session, Statement statement) { _session = session; _statement = statement; _holder = this; }
public IQueryHandler <TResult> BuildSingleResultHandler <TResult>(IMartenSession session, Statement topStatement) { var selector = (ISelector <TResult>)SelectClause.BuildSelector(session); return(new OneResultHandler <TResult>(topStatement, selector, ReturnDefaultWhenEmpty, CanBeMultiples)); }
public ISelector BuildSelector(IMartenSession session) { return(new SerializationSelector <T>(session.Serializer)); }
public Page(IMartenSession session) { _session = session; _builder = new CommandBuilder(_command); }
private void startNewPage(IMartenSession session) { _current = new Page(session); _pages.Add(_current); }
public abstract ISelector BuildSelector(IMartenSession session);
public abstract Task <IReadOnlyList <T> > LoadManyAsync(TId[] ids, IMartenSession session, CancellationToken token);
public abstract IReadOnlyList <T> LoadMany(TId[] ids, IMartenSession session);
public void ConfigureCommand(CommandBuilder builder, IMartenSession session) { builder.Append(_sql); }
public MartenLinqQueryable(IMartenSession session, MartenLinqQueryProvider provider, Expression expression) : base(provider, expression) { Session = session; MartenProvider = provider; }
public MartenLinqQueryProvider(IMartenSession session) { _session = session; }
public MartenLinqQueryable(IMartenSession session, Expression expression) : base(new MartenLinqQueryProvider(session), expression) { Session = session; MartenProvider = TypeExtensions.As <MartenLinqQueryProvider>(Provider); }
public abstract void ConfigureCommand(CommandBuilder builder, IMartenSession session);
public sealed override void Store(IMartenSession session, T document, Guid?version) { }
public abstract Task <IStorageOperation> DetermineOperation(IMartenSession session, StreamFragment <TDoc, TId> fragment, CancellationToken cancellation);
public sealed override void Eject(IMartenSession session, T document) { }
public abstract IStorageOperation DetermineOperationSync(IMartenSession session, StreamFragment <TDoc, TId> fragment);
public sealed override async Task <IReadOnlyList <T> > LoadManyAsync(TId[] ids, IMartenSession session, CancellationToken token) { var list = new List <T>(); var command = BuildLoadManyCommand(ids, session.Tenant); var selector = (ISelector <T>)BuildSelector(session); using (var reader = await session.Database.ExecuteReaderAsync(command, token).ConfigureAwait(false)) { while (await reader.ReadAsync(token).ConfigureAwait(false)) { var document = await selector.ResolveAsync(reader, token).ConfigureAwait(false); list.Add(document); } } return(list); }
public IQueryHandler <T> BuildHandler <T>(IMartenSession session, Statement topStatement, Statement currentStatement) { // It's wrapped in LinqHandlerBuilder return(_clonedEnd.SelectClause.BuildHandler <T>(session, topStatement, currentStatement)); }
public sealed override T Load(TId id, IMartenSession session) { return(load(id, session)); }
public ISelector BuildSelector(IMartenSession session) { throw new System.NotSupportedException(); }
public sealed override Task <T> LoadAsync(TId id, IMartenSession session, CancellationToken token) { return(loadAsync(id, session, token)); }
public abstract void Store(IMartenSession session, T document, Guid?version);
public abstract T?Load(TId id, IMartenSession session);