storage

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database interface {
	internal.PartitionStorer
	StoreEvent(ctx context.Context, appServiceID string, event *gomatrixserverlib.HeaderedEvent) error
	GetEventsWithAppServiceID(ctx context.Context, appServiceID string, limit int) (int, int, []gomatrixserverlib.HeaderedEvent, bool, error)
	CountEventsWithAppServiceID(ctx context.Context, appServiceID string) (int, error)
	UpdateTxnIDForEvents(ctx context.Context, appserviceID string, maxID, txnID int) error
	RemoveEventsBeforeAndIncludingID(ctx context.Context, appserviceID string, eventTableID int) error
	GetLatestTxnID(ctx context.Context) (int, error)
}

func NewDatabase

func NewDatabase(dbProperties *config.DatabaseOptions) (Database, error)

NewDatabase opens a new Postgres or Sqlite database (based on dataSourceName scheme) and sets DB connection parameters

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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