Documentation ¶
Index ¶
- func BySequenceID(value string) eventsource.QueryOption
- func ByTimestamp(value int64) eventsource.QueryOption
- func ByType(value string) eventsource.QueryOption
- func New(db *sql.DB, tableName string) eventsource.Store
- func NewPgx(db driver.PgxPool, tableName string) eventsource.Store
- func WithAscending() eventsource.QueryOption
- func WithDescending() eventsource.QueryOption
- func WithLimit(limit int) eventsource.QueryOption
- func WithOffset(offset int) eventsource.QueryOption
- type EventDB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BySequenceID ¶ added in v2.2.0
func BySequenceID(value string) eventsource.QueryOption
func ByTimestamp ¶ added in v2.2.0
func ByTimestamp(value int64) eventsource.QueryOption
func ByType ¶ added in v2.2.0
func ByType(value string) eventsource.QueryOption
func New ¶
func New(db *sql.DB, tableName string) eventsource.Store
New creates a new event source store.
func NewPgx ¶ added in v2.9.0
func NewPgx(db driver.PgxPool, tableName string) eventsource.Store
NewPgx creates a new event source store.
func WithAscending ¶
func WithAscending() eventsource.QueryOption
WithAscending will set the sorting order to ascending.
func WithDescending ¶
func WithDescending() eventsource.QueryOption
WithDescending will set the sorting order to descending.
func WithOffset ¶
func WithOffset(offset int) eventsource.QueryOption
WithOffset will offset the result.
Types ¶
type EventDB ¶ added in v2.9.0
type EventDB interface { Load(ctx context.Context, query string, args []interface{}) ([]eventsource.Record, error) NewTransaction(ctx context.Context, query string, records ...eventsource.Record) (eventsource.StoreTransaction, error) }
Click to show internal directories.
Click to hide internal directories.