pgxadapter

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

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

Conn is the adapter type for PGx connection connection type

func NewConn

func NewConn(conn *pgx.Conn) *Conn

NewConn instantiates PGx connection adapter

func (*Conn) Exec

func (a *Conn) Exec(query string, args ...interface{}) error

Exec runs a query and returns an error if any

func (*Conn) SelectOne

func (a *Conn) SelectOne(dst interface{}, query string, args ...interface{}) error

SelectOne runs a select query and scans the object into a struct or returns an error

type ConnPool

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

ConnPool is the adapter type for PGx connection pool connection type

func NewConnPool

func NewConnPool(conn *pgx.ConnPool) *ConnPool

NewConnPool instantiates PGx connection pool adapter

func (*ConnPool) Exec

func (a *ConnPool) Exec(query string, args ...interface{}) error

Exec runs a query and returns an error if any

func (*ConnPool) SelectOne

func (a *ConnPool) SelectOne(dst interface{}, query string, args ...interface{}) error

SelectOne runs a select query and scans the object into a struct or returns an error

Jump to

Keyboard shortcuts

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