Interface IJournalQueryExecutor
SQL query builder used for generating queries required to perform journal's tasks.
Namespace: Akka.Persistence.Sql.Common.Journal
Assembly: Akka.Persistence.Sql.Common.dll
Syntax
public interface IJournalQueryExecutor
Properties
| Improve this Doc View SourceConfiguration
Configuration settings for the current query executor.
Declaration
QueryConfiguration Configuration { get; }
Property Value
Type | Description |
---|---|
QueryConfiguration |
Methods
| Improve this Doc View SourceCreateTablesAsync(DbConnection, CancellationToken)
Asynchronously tries to create new event journal and metadata tables.
Declaration
Task CreateTablesAsync(DbConnection connection, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
DbConnection | connection | TBD |
CancellationToken | cancellationToken | TBD |
Returns
Type | Description |
---|---|
Task | TBD |
DeleteBatchAsync(DbConnection, CancellationToken, String, Int64)
Asynchronously (permanently) deletes all events with given persistenceId
, up to provided toSequenceNr
.
Declaration
Task DeleteBatchAsync(DbConnection connection, CancellationToken cancellationToken, string persistenceId, long toSequenceNr)
Parameters
Type | Name | Description |
---|---|---|
DbConnection | connection | TBD |
CancellationToken | cancellationToken | TBD |
String | persistenceId | TBD |
Int64 | toSequenceNr | TBD |
Returns
Type | Description |
---|---|
Task | TBD |
InsertBatchAsync(DbConnection, CancellationToken, WriteJournalBatch)
Asynchronously inserts a collection of events and theirs tags into a journal table.
Declaration
Task InsertBatchAsync(DbConnection connection, CancellationToken cancellationToken, WriteJournalBatch write)
Parameters
Type | Name | Description |
---|---|---|
DbConnection | connection | TBD |
CancellationToken | cancellationToken | TBD |
WriteJournalBatch | write | TBD |
Returns
Type | Description |
---|---|
Task | TBD |
SelectAllEventsAsync(DbConnection, CancellationToken, Int64, Int64, Int64, Action<ReplayedEvent>)
Declaration
Task<long> SelectAllEventsAsync(DbConnection connection, CancellationToken cancellationToken, long fromOffset, long toOffset, long max, Action<ReplayedEvent> callback)
Parameters
Type | Name | Description |
---|---|---|
DbConnection | connection | |
CancellationToken | cancellationToken | |
Int64 | fromOffset | |
Int64 | toOffset | |
Int64 | max | |
Action<ReplayedEvent> | callback |
Returns
Type | Description |
---|---|
Task<Int64> |
SelectAllPersistenceIdsAsync(DbConnection, CancellationToken, Int64)
Asynchronously returns all persistence Ids.
Declaration
Task<ImmutableArray<string>> SelectAllPersistenceIdsAsync(DbConnection connection, CancellationToken cancellationToken, long offset)
Parameters
Type | Name | Description |
---|---|---|
DbConnection | connection | TBD |
CancellationToken | cancellationToken | TBD |
Int64 | offset | TBD |
Returns
Type | Description |
---|---|
Task<System.Collections.Immutable.ImmutableArray<String>> | TBD |
SelectByPersistenceIdAsync(DbConnection, CancellationToken, String, Int64, Int64, Int64, Action<IPersistentRepresentation>)
Asynchronously replays a callback
on all selected events for provided
persistenceId
, within boundaries of fromSequenceNr
and toSequenceNr
up to max
number of events.
Declaration
Task SelectByPersistenceIdAsync(DbConnection connection, CancellationToken cancellationToken, string persistenceId, long fromSequenceNr, long toSequenceNr, long max, Action<IPersistentRepresentation> callback)
Parameters
Type | Name | Description |
---|---|---|
DbConnection | connection | TBD |
CancellationToken | cancellationToken | TBD |
String | persistenceId | TBD |
Int64 | fromSequenceNr | TBD |
Int64 | toSequenceNr | TBD |
Int64 | max | TBD |
Action<IPersistentRepresentation> | callback | TBD |
Returns
Type | Description |
---|---|
Task | TBD |
SelectByTagAsync(DbConnection, CancellationToken, String, Int64, Int64, Int64, Action<ReplayedTaggedMessage>)
Asynchronously replays callback
on all selected events, which have been tagged using
provided tag
, within boundaries of fromOffset
and
toOffset
, up to max
number of elements.
Returns highest sequence number from selected events.
Declaration
Task<long> SelectByTagAsync(DbConnection connection, CancellationToken cancellationToken, string tag, long fromOffset, long toOffset, long max, Action<ReplayedTaggedMessage> callback)
Parameters
Type | Name | Description |
---|---|---|
DbConnection | connection | TBD |
CancellationToken | cancellationToken | TBD |
String | tag | TBD |
Int64 | fromOffset | TBD |
Int64 | toOffset | TBD |
Int64 | max | TBD |
Action<ReplayedTaggedMessage> | callback | TBD |
Returns
Type | Description |
---|---|
Task<Int64> | TBD |
SelectHighestSequenceNrAsync(DbConnection, CancellationToken)
Declaration
Task<long> SelectHighestSequenceNrAsync(DbConnection connection, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
DbConnection | connection | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<Int64> |
SelectHighestSequenceNrAsync(DbConnection, CancellationToken, String)
Asynchronously returns single number considered as the highest sequence number in current journal for the provided persistenceId
.
Declaration
Task<long> SelectHighestSequenceNrAsync(DbConnection connection, CancellationToken cancellationToken, string persistenceId)
Parameters
Type | Name | Description |
---|---|---|
DbConnection | connection | TBD |
CancellationToken | cancellationToken | TBD |
String | persistenceId | TBD |
Returns
Type | Description |
---|---|
Task<Int64> | TBD |