pgsql

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: Apache-2.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 PGSQL added in v0.0.4

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

PGSQL is a implementation go storage.Store interface

func New

func New(c *storage.Config, mtrs *metrics.Metrics) (*PGSQL, error)

New return

func (*PGSQL) Close added in v0.0.4

func (c *PGSQL) Close() error

Close closes the database and prevents new queries from starting.

func (*PGSQL) Connect added in v0.0.4

func (c *PGSQL) Connect(ctx context.Context) error

Connect returns a single connection by either opening a new connection or returning an existing connection from the connection pool.

func (*PGSQL) ExecContext added in v0.0.4

func (c *PGSQL) ExecContext(ctx context.Context, q string) (sql.Result, error)

ExecContext executes a query without returning any rows.

func (*PGSQL) Ping added in v0.0.4

func (c *PGSQL) Ping(ctx context.Context) error

Ping verifies a connection to the database is still alive, establishing a connection if necessary.

func (*PGSQL) Stats added in v0.0.4

func (c *PGSQL) Stats() sql.DBStats

Stats return the database metrics statistics

Jump to

Keyboard shortcuts

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