Table of Contents

Class SqliteEventSourcingOptions

Namespace
Excalibur.EventSourcing.Sqlite.DependencyInjection
Assembly
Excalibur.EventSourcing.Sqlite.dll

Configuration options for SQLite event sourcing.

public sealed class SqliteEventSourcingOptions
Inheritance
SqliteEventSourcingOptions
Inherited Members

Properties

ConnectionString

Gets or sets the SQLite connection string.

[Required]
public string ConnectionString { get; set; }

Property Value

string

Examples

Data Source=events.db

EventStoreTable

Gets or sets the event store table name. Default: "Events".

public string EventStoreTable { get; set; }

Property Value

string

EventTypeInfoResolver

Gets or sets a source-generated JSON type-info resolver covering the application's domain event types and the runtime types of the values it places in Metadata, enabling a reflection-free serialization path under trimming and native AOT.

public IJsonTypeInfoResolver? EventTypeInfoResolver { get; set; }

Property Value

IJsonTypeInfoResolver

The consumer's event type-info resolver, or null to serialize through reflection.

Remarks

Domain events are consumer types the framework cannot source-generate, so with no resolver the store serializes them through the reflection-based JsonSerializer. That works under the JIT, but a native-AOT application published with reflection-based serialization disabled has no reflection path to fall back on and the first append fails. Set this to a JsonSerializerContext (or any IJsonTypeInfoResolver) covering those types to remove that dependency.

The stored wire format does not vary with this setting. The resolver supplies type metadata only; the property naming policy, string-enum representation and null handling are the store's own and are applied to whichever resolver is in use, so events written with a resolver are byte-identical to events written without one and remain readable by a host configured either way.

Metadata values are typed object and are therefore written as their runtime type. Declare each closed value type the application actually stores -- string, int, bool and so on. Do not declare Dictionary<string, object> as a shortcut: it compiles and then throws on the values it was meant to cover.

SnapshotStoreTable

Gets or sets the snapshot store table name. Default: "Snapshots".

public string SnapshotStoreTable { get; set; }

Property Value

string