postgresclient

package
v0.0.0-...-16d19c9 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoConn = errors.New("no database connection")

Functions

This section is empty.

Types

type Client

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

func New

func New(connStr string) *Client

func (*Client) BeginTx

func (c *Client) BeginTx(ctx context.Context) (*sql.Tx, error)

func (*Client) Close

func (c *Client) Close()

func (*Client) Connect

func (c *Client) Connect()

func (*Client) ExecContext

func (c *Client) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, 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, error)

type Config

type Config struct {
	User string
	Pass string
	Host string
	Port string
	Name string
}

func (Config) String

func (cfg Config) String() string

Jump to

Keyboard shortcuts

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