Documentation
¶
Index ¶
- Variables
- func MigrateDown(db *sql.DB) error
- func MigrateUp(db *sql.DB) error
- func WrapError(msg string, err error) error
- func WrapErrorf(msg string, err error, args ...any) error
- type AddAggregateWithNaturalKeyParams
- type AddEventParams
- type AddSnapshotParams
- type Aggregate
- type AggregateType
- type DBTX
- type Event
- type EventType
- type GetAggregateByIdParams
- type GetAggregateByIdRow
- type GetAggregateIdByNaturalKeyParams
- type GetEventsForAggregateParams
- type GetEventsForAggregateRow
- type GetMostRecentSnapshotRow
- type Queries
- func (q *Queries) AddAggregate(ctx context.Context, aggregateTypeID int64) (int64, error)
- func (q *Queries) AddAggregateType(ctx context.Context, aggregateTypeName string) (int64, error)
- func (q *Queries) AddAggregateWithNaturalKey(ctx context.Context, arg AddAggregateWithNaturalKeyParams) (int64, error)
- func (q *Queries) AddEvent(ctx context.Context, arg AddEventParams) error
- func (q *Queries) AddEventType(ctx context.Context, eventName string) (int64, error)
- func (q *Queries) AddSnapshot(ctx context.Context, arg AddSnapshotParams) error
- func (q *Queries) GetAggregateById(ctx context.Context, arg GetAggregateByIdParams) (GetAggregateByIdRow, error)
- func (q *Queries) GetAggregateIdByNaturalKey(ctx context.Context, arg GetAggregateIdByNaturalKeyParams) (int64, error)
- func (q *Queries) GetAggregateTypeIdByName(ctx context.Context, aggregateTypeName string) (int64, error)
- func (q *Queries) GetAggregateTypes(ctx context.Context) ([]AggregateType, error)
- func (q *Queries) GetEventTypeIdByName(ctx context.Context, eventName string) (int64, error)
- func (q *Queries) GetEventTypes(ctx context.Context) ([]EventType, error)
- func (q *Queries) GetEventsForAggregate(ctx context.Context, arg GetEventsForAggregateParams) ([]GetEventsForAggregateRow, error)
- func (q *Queries) GetMostRecentSnapshot(ctx context.Context, aggregateID int64) (GetMostRecentSnapshotRow, error)
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type Snapshot
- type SqliteStorageEngine
- func (s *SqliteStorageEngine) GetAggregateById(tx evercore.StorageEngineTxInfo, ctx context.Context, aggregateTypeId int64, ...) (int64, *string, error)
- func (s *SqliteStorageEngine) GetAggregateByKey(tx evercore.StorageEngineTxInfo, ctx context.Context, aggregateTypeId int64, ...) (int64, error)
- func (s *SqliteStorageEngine) GetAggregateTypeId(tx evercore.StorageEngineTxInfo, ctx context.Context, aggregateTypeName string) (int64, error)
- func (s *SqliteStorageEngine) GetAggregateTypes(tx evercore.StorageEngineTxInfo, ctx context.Context) ([]evercore.IdNamePair, error)
- func (s *SqliteStorageEngine) GetEventTypeId(tx evercore.StorageEngineTxInfo, ctx context.Context, name string) (int64, error)
- func (s *SqliteStorageEngine) GetEventTypes(tx evercore.StorageEngineTxInfo, ctx context.Context) ([]evercore.IdNamePair, error)
- func (s *SqliteStorageEngine) GetEventsForAggregate(tx evercore.StorageEngineTxInfo, ctx context.Context, aggregateId int64, ...) ([]evercore.SerializedEvent, error)
- func (stor *SqliteStorageEngine) GetMaxKeyLength() int
- func (s *SqliteStorageEngine) GetOrCreateAggregateByKey(tx evercore.StorageEngineTxInfo, ctx context.Context, aggregateTypeId int64, ...) (bool, int64, error)
- func (s *SqliteStorageEngine) GetSnapshotForAggregate(tx evercore.StorageEngineTxInfo, ctx context.Context, aggregateId int64) (*evercore.Snapshot, error)
- func (s *SqliteStorageEngine) GetTransactionInfo() (evercore.StorageEngineTxInfo, error)
- func (s *SqliteStorageEngine) NewAggregate(tx evercore.StorageEngineTxInfo, ctx context.Context, aggregateTypeId int64) (int64, error)
- func (s *SqliteStorageEngine) NewAggregateWithKey(tx evercore.StorageEngineTxInfo, ctx context.Context, aggregateTypeId int64, ...) (int64, error)
- func (s *SqliteStorageEngine) WriteState(tx evercore.StorageEngineTxInfo, ctx context.Context, ...) error
Constants ¶
This section is empty.
Variables ¶
View Source
var EmbeddedSqliteMigrations embed.FS
Functions ¶
func MigrateDown ¶
Types ¶
type AddAggregateWithNaturalKeyParams ¶
type AddAggregateWithNaturalKeyParams struct {
AggregateTypeID int64
NaturalKey sql.NullString
}
type AddEventParams ¶
type AddSnapshotParams ¶
type AggregateType ¶
type GetAggregateByIdParams ¶
type GetAggregateByIdRow ¶
type GetAggregateByIdRow struct {
ID int64
NaturalKey sql.NullString
}
type GetAggregateIdByNaturalKeyParams ¶
type GetAggregateIdByNaturalKeyParams struct {
AggregateTypeID int64
NaturalKey sql.NullString
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) AddAggregate ¶
Aggregate Queries
func (*Queries) AddAggregateType ¶
Aggregate Type Queries
func (*Queries) AddAggregateWithNaturalKey ¶
func (*Queries) AddEvent ¶
func (q *Queries) AddEvent(ctx context.Context, arg AddEventParams) error
Event Queries
func (*Queries) AddEventType ¶
Event Type Queries
func (*Queries) AddSnapshot ¶
func (q *Queries) AddSnapshot(ctx context.Context, arg AddSnapshotParams) error
func (*Queries) GetAggregateById ¶
func (q *Queries) GetAggregateById(ctx context.Context, arg GetAggregateByIdParams) (GetAggregateByIdRow, error)
func (*Queries) GetAggregateIdByNaturalKey ¶
func (*Queries) GetAggregateTypeIdByName ¶
func (*Queries) GetAggregateTypes ¶
func (q *Queries) GetAggregateTypes(ctx context.Context) ([]AggregateType, error)
func (*Queries) GetEventTypeIdByName ¶
func (*Queries) GetEventTypes ¶
func (*Queries) GetEventsForAggregate ¶
func (q *Queries) GetEventsForAggregate(ctx context.Context, arg GetEventsForAggregateParams) ([]GetEventsForAggregateRow, error)
func (*Queries) GetMostRecentSnapshot ¶
type SqliteStorageEngine ¶
type SqliteStorageEngine struct {
// contains filtered or unexported fields
}
func NewSqliteStorageEngine ¶
func NewSqliteStorageEngine(db *sql.DB) *SqliteStorageEngine
Creates a new Sqlite3 backed storage engine.
func NewSqliteStorageEngineWithConnection ¶
func NewSqliteStorageEngineWithConnection(connectionString string) (*SqliteStorageEngine, error)
Creates a new Sqlite backed storage engine connecting to the connection string.
func (*SqliteStorageEngine) GetAggregateById ¶
func (*SqliteStorageEngine) GetAggregateByKey ¶
func (*SqliteStorageEngine) GetAggregateTypeId ¶
func (*SqliteStorageEngine) GetAggregateTypes ¶
func (s *SqliteStorageEngine) GetAggregateTypes(tx evercore.StorageEngineTxInfo, ctx context.Context) ([]evercore.IdNamePair, error)
func (*SqliteStorageEngine) GetEventTypeId ¶
func (*SqliteStorageEngine) GetEventTypes ¶
func (s *SqliteStorageEngine) GetEventTypes(tx evercore.StorageEngineTxInfo, ctx context.Context) ([]evercore.IdNamePair, error)
func (*SqliteStorageEngine) GetEventsForAggregate ¶
func (*SqliteStorageEngine) GetMaxKeyLength ¶
func (stor *SqliteStorageEngine) GetMaxKeyLength() int
func (*SqliteStorageEngine) GetOrCreateAggregateByKey ¶
func (*SqliteStorageEngine) GetSnapshotForAggregate ¶
func (s *SqliteStorageEngine) GetSnapshotForAggregate(tx evercore.StorageEngineTxInfo, ctx context.Context, aggregateId int64) (*evercore.Snapshot, error)
func (*SqliteStorageEngine) GetTransactionInfo ¶
func (s *SqliteStorageEngine) GetTransactionInfo() (evercore.StorageEngineTxInfo, error)
func (*SqliteStorageEngine) NewAggregate ¶
func (*SqliteStorageEngine) NewAggregateWithKey ¶
func (*SqliteStorageEngine) WriteState ¶
func (s *SqliteStorageEngine) WriteState(tx evercore.StorageEngineTxInfo, ctx context.Context, events []evercore.StorageEngineEvent, snapshots evercore.SnapshotSlice) error
Click to show internal directories.
Click to hide internal directories.