Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) Close()
- func (c *Client) Exec(ctx context.Context, sql string, args ...interface{}) (pgconn.CommandTag, error)
- func (c *Client) Query(ctx context.Context, sql string, args ...interface{}) (pgx.Rows, error)
- func (c *Client) QueryRow(ctx context.Context, sql string, args ...interface{}) pgx.Row
- func (c *Client) WithTx(ctx context.Context, txFunc func(ctx context.Context) error) error
- type ConnectionConfig
- type Option
- type Transactor
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnableToConnect = errors.New("all attempts are exceeded. Unable to connect to instance")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Builder sq.StatementBuilderType Pool *pgxpool.Pool // contains filtered or unexported fields }
type ConnectionConfig ¶
type ConnectionConfig struct {
// contains filtered or unexported fields
}
func NewConnectionConfig ¶
func NewConnectionConfig(host, port, dbname, username, password, sslmode string) ConnectionConfig
type Option ¶
type Option func(*Client)
func WithConnAttempts ¶
func WithConnTimeout ¶
func WithMaxPoolSize ¶
type Transactor ¶
type Transactor struct {
// contains filtered or unexported fields
}
func NewTransactor ¶
func NewTransactor(db *Client) *Transactor
Click to show internal directories.
Click to hide internal directories.