postgres

package
v0.32.3 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2022 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MinPostgresVersion = version.Must(version.NewVersion("10.0"))

Functions

func GetDatabaseId

func GetDatabaseId(ctx context.Context, q pgxscan.Querier) (string, error)

func GetDatabaseInfo added in v0.24.3

func GetDatabaseInfo(ctx context.Context, q pgxscan.Querier) model.DatabaseInfo

func ValidatePostgresConnection

func ValidatePostgresConnection(ctx context.Context, pool *pgxpool.Pool) error

ValidatePostgresConnection validates that we can actually connect to the postgres database.

func ValidatePostgresVersion

func ValidatePostgresVersion(ctx context.Context, pool *pgxpool.Pool) error

ValidatePostgresVersion checks that PostgreSQL instance version available through pool is not lower than wanted version. In this case it returns nil. Otherwise returns error describing current and desired version or any other error encountered during the check.

Types

type Executor

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

func New

func New(dsn string) *Executor

func (Executor) Identifier

func (e Executor) Identifier(_ context.Context) (string, bool)

func (*Executor) Info added in v0.24.3

func (*Executor) Validate

func (e *Executor) Validate(ctx context.Context) (bool, error)

Jump to

Keyboard shortcuts

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