Documentation ¶
Index ¶
- Variables
- func Context(timeout time.Duration) (context.Context, context.CancelFunc)
- type Batch
- type BatchResults
- type Client
- func (cl *Client) Close()
- func (cl *Client) Connect() error
- func (cl *Client) Database() string
- func (cl *Client) Execute(ctx context.Context, sql string, args ...interface{}) (int64, error)
- func (cl *Client) Pool() *pgxpool.Pool
- func (cl *Client) Query(ctx context.Context, sql string, args ...interface{}) (Rows, error)
- func (cl *Client) QueryRow(ctx context.Context, sql string, args ...interface{}) Row
- func (cl *Client) Transaction(ctx context.Context, fn func(*Transaction) error) error
- type Config
- type Crypto
- type Row
- type Rows
- type Transaction
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// ErrNoRows AFAIRE.
ErrNoRows = pgx.ErrNoRows
)
Functions ¶
Types ¶
type Batch ¶
type Batch interface { Len() int Queue(sql string, args ...interface{}) Send(ctx context.Context, client *Client) BatchResults }
Batch AFAIRE.
type BatchResults ¶
type BatchResults interface { Execute() (int64, error) Query() (Rows, error) QueryRow() Row Close() error }
BatchResults AFAIRE.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client AFAIRE.
func (*Client) Transaction ¶
Transaction AFAIRE.
type Config ¶
type Config struct { Host string Port int Username string Password string Database string MaxConns int MinConns int ConnLifeTime time.Duration ConnIdleTime time.Duration HealthCheckPeriod time.Duration ConnectTimeout time.Duration }
Config AFAIRE.
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
Transaction AFAIRE.
func (*Transaction) Execute ¶
func (t *Transaction) Execute(sql string, args ...interface{}) (int64, error)
Execute AFAIRE.
func (*Transaction) Query ¶
func (t *Transaction) Query(sql string, args ...interface{}) (Rows, error)
Query AFAIRE.
func (*Transaction) QueryRow ¶
func (t *Transaction) QueryRow(sql string, args ...interface{}) Row
QueryRow AFAIRE.
Click to show internal directories.
Click to hide internal directories.