xpgtst

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: Apache-2.0 Imports: 5 Imported by: ? 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

This section is empty.

Variables

This section is empty.

Functions

func Conn

func Conn(t testing.TB) *xpg.Conn

Conn creates new real connection to database and t.SkipNow() if is not parsable or missing

Types

type TestingConn

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

TestingConn is struct helping to keep conn to database and help to close it when needed.

func NewConn

func NewConn(t testing.TB) *TestingConn

NewConn creates new testing connection.

func (*TestingConn) Close

func (t *TestingConn) Close()

Close will close connection to db.

func (*TestingConn) Get

func (t *TestingConn) Get() *pg.DB

Get return conn to database which is type orm.DB

type TestingConnTx

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

TestingConnTx is struct helping to keep conn to database and help to close it when needed.

func NewConnTx

func NewConnTx(t testing.TB) *TestingConnTx

NewConnTx creates new testing connection. Also create transaction which will be closed one .Close() is called

func (*TestingConnTx) Close

func (t *TestingConnTx) Close()

Close will close connection to db and rollback transaction

func (*TestingConnTx) Get

func (t *TestingConnTx) Get() *pg.Tx

Get return conn to database which is type orm.DB

Jump to

Keyboard shortcuts

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