store

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const TestPostgresConnStr = "host=127.0.0.1 dbname=pgscv_fixtures user=pgscv sslmode=disable"

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

DB is the database representation

func New

func New(connString string) (*DB, error)

New creates new connection to Postgres/Pgbouncer using passed DSN

func NewTest

func NewTest(t *testing.T) *DB

func NewWithConfig

func NewWithConfig(config *pgx.ConnConfig) (*DB, error)

NewWithConfig creates new connection to Postgres/Pgbouncer using passed Config.

func (*DB) Close

func (db *DB) Close()

Close is wrapper on private close() method.

func (*DB) Conn

func (db *DB) Conn() *pgx.Conn

Conn provides access to public methods of *pgx.Conn struct

func (*DB) Query

func (db *DB) Query(query string) (*model.PGResult, error)

Query is a wrapper on private query() method.

Jump to

Keyboard shortcuts

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