db

package
v0.0.0-...-b289748 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	UGen *types.UidGenerator
	// contains filtered or unexported fields
}

func NewDB

func NewDB(ua DBArgs) *DB

func (*DB) CheckDbVersion

func (d *DB) CheckDbVersion() error

CheckDbVersion checks whether the actual DB version matches the expected version of this adapter.

func (*DB) Close

func (d *DB) Close() error

func (*DB) GetDbVersion

func (d *DB) GetDbVersion() (int, error)

GetDbVersion returns current database version.

func (*DB) GetName

func (d *DB) GetName() string

GetName returns string that adapter uses to register itself with store.

func (*DB) IsOpen

func (d *DB) IsOpen() bool

IsOpen returns true if connection to database has been established.

It does not check if connection is actually live.

func (*DB) SetMaxResults

func (d *DB) SetMaxResults(val int) error

SetMaxResults configures how many results can be returned in a single DB call.

func (*DB) Stats

func (d *DB) Stats() any

Stats, returns connection stats object.

func (*DB) Version

func (d *DB) Version() int

Version returns adapter version.

type DBArgs

type DBArgs struct {
	DB    *pgxpool.Pool
	Cfg   *config.StorePostgresConfig
	UGen  *types.UidGenerator
	Utils *utils.Utils
}

Jump to

Keyboard shortcuts

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