postgres

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrUnknownTx

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

func (ErrUnknownTx) Error

func (err ErrUnknownTx) Error() string

type Storage added in v0.8.0

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

func NewFromConn added in v0.8.0

func NewFromConn(conn *sql.DB) (*Storage, error)

func NewFromUrl

func NewFromUrl(databaseUrl string) (*Storage, error)

func (*Storage) Begin added in v0.8.0

func (store *Storage) Begin(ctx context.Context) (store.Tx, error)

func (*Storage) DeleteSnapshot added in v0.8.0

func (store *Storage) DeleteSnapshot(ctx context.Context, id streams.Id, snapshotId string) error

func (*Storage) ReadRecords added in v0.8.0

func (store *Storage) ReadRecords(ctx context.Context, id streams.Id, from int64, to, limit int64) ([]record.Record, error)

func (*Storage) ReadSnapshot added in v0.8.0

func (store *Storage) ReadSnapshot(ctx context.Context, id streams.Id, snapshotId string) (record.Snapshot, error)

func (*Storage) SetSubscriptionPosition added in v0.8.0

func (store *Storage) SetSubscriptionPosition(storeTx store.Tx, id streams.Id, position store.SubscriptionPosition) error

func (*Storage) SubscriptionPositionLock added in v0.8.0

func (store *Storage) SubscriptionPositionLock(storeTx store.Tx, id streams.Id, subscriptionIds ...string) ([]store.SubscriptionPosition, error)

func (*Storage) UpdateSnapshot added in v0.8.0

func (store *Storage) UpdateSnapshot(ctx context.Context, id streams.Id, snapshotId string, snapshot record.Snapshot) error

func (*Storage) WriteRecords added in v0.8.0

func (store *Storage) WriteRecords(ctx context.Context, id streams.Id, data ...record.Data) ([]record.Record, error)

func (*Storage) WriteRecordsFrom added in v0.8.0

func (store *Storage) WriteRecordsFrom(ctx context.Context, id streams.Id, position int64, data ...record.Data) ([]record.Record, error)

Directories

Path Synopsis
generated
db

Jump to

Keyboard shortcuts

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