sql

package
v1.43.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CRDB

type CRDB struct {
	// contains filtered or unexported fields
}

func NewCRDB

func NewCRDB(client *sql.DB) *CRDB

func (*CRDB) Filter

func (db *CRDB) Filter(ctx context.Context, searchQuery *repository.SearchQuery) (events []*repository.Event, err error)

Filter returns all events matching the given search query

func (*CRDB) Health

func (db *CRDB) Health(ctx context.Context) error

func (*CRDB) LatestSequence

func (db *CRDB) LatestSequence(ctx context.Context, searchQuery *repository.SearchQuery) (uint64, error)

LatestSequence returns the latests sequence found by the the search query

func (*CRDB) Push

func (db *CRDB) Push(ctx context.Context, events []*repository.Event, uniqueConstraints ...*repository.UniqueConstraint) error

Push adds all events to the eventstreams of the aggregates. This call is transaction save. The transaction will be rolled back if one event fails

func (*CRDB) Step20 added in v1.34.2

func (db *CRDB) Step20(ctx context.Context, latestSequence uint64) error

type Data

type Data []byte

Data represents a byte array that may be null. Data implements the sql.Scanner interface

func (*Data) Scan

func (data *Data) Scan(value interface{}) error

Scan implements the Scanner interface.

func (Data) Value

func (data Data) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Sequence

type Sequence uint64

Sequence represents a number that may be null. Sequence implements the sql.Scanner interface

func (*Sequence) Scan

func (seq *Sequence) Scan(value interface{}) error

Scan implements the Scanner interface.

func (Sequence) Value

func (seq Sequence) Value() (driver.Value, error)

Value implements the driver Valuer interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL