postgres

package
v0.0.0-...-b351023 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrTxActive   = Error("another transaction is already active")
	ErrTxInactive = Error("there is no active transaction")
)

Variables

This section is empty.

Functions

func Init

func Init()

Types

type Client

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

func NewClient

func NewClient() *Client

func (*Client) Begin

func (c *Client) Begin(ctx context.Context) error

func (*Client) Commit

func (c *Client) Commit() error

func (*Client) ExecContext

func (c *Client) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)

func (*Client) PrepareContext

func (c *Client) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)

func (*Client) QueryContext

func (c *Client) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)

func (*Client) QueryRowContext

func (c *Client) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row

func (*Client) Rollback

func (c *Client) Rollback() error

type Error

type Error string

func (Error) Error

func (e Error) Error() string

Jump to

Keyboard shortcuts

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