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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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