Documentation
¶
Index ¶
- Variables
- func CtxWT(timeout time.Duration) (context.Context, context.CancelFunc)
- type Batch
- type BatchResults
- type Client
- func (c *Client) Database() string
- func (c *Client) Execute(ctx context.Context, sql string, args ...interface{}) (int64, error)
- func (c *Client) Pool() *pgxpool.Pool
- func (c *Client) Query(ctx context.Context, sql string, args ...interface{}) (Rows, error)
- func (c *Client) QueryRow(ctx context.Context, sql string, args ...interface{}) Row
- func (c *Client) Transaction(ctx context.Context, fn func(*Transaction) error) error
- type Crypto
- type Database
- type DatabaseConfig
- type Logger
- type NodeConfig
- type Row
- type Rows
- type Transaction
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoRows = pgx.ErrNoRows
ErrNoRows AFAIRE.
Functions ¶
Types ¶
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 Database ¶
type Database struct {
// contains filtered or unexported fields
}
func (*Database) PrimaryPreferred ¶
PrimaryPreferred AFAIRE.
type DatabaseConfig ¶
type DatabaseConfig struct {
Name string
Nodes []*NodeConfig
Crypto Crypto
Logger Logger
}
DatabaseConfig AFAIRE.
type Logger ¶
type Logger interface {
Trace(msg string, kv ...interface{})
Debug(msg string, kv ...interface{})
Info(msg string, kv ...interface{})
Warning(msg string, kv ...interface{})
Error(msg string, kv ...interface{})
}
Logger AFAIRE.
type NodeConfig ¶
type NodeConfig struct {
Host string
Port int
Username string
Password string
MaxConns int
MinConns int
ConnLifeTime time.Duration
ConnIdleTime time.Duration
HealthCheckPeriod time.Duration
ConnectTimeout time.Duration
}
NodeConfig 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.