Documentation
¶
Index ¶
Constants ¶
View Source
const ( SCMPrepare = "prepare" SCMDescribe = "describe" )
StatementCacheMode values prepare - default describe - use it for PGBouncer connections
View Source
const (
ConstraintErrorCode = "23505"
)
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶ added in v0.0.90
Types ¶
type AffectedLessThenNecessaryError ¶ added in v0.0.90
func (*AffectedLessThenNecessaryError) Error ¶ added in v0.0.90
func (e *AffectedLessThenNecessaryError) Error() string
type Config ¶
type Config struct { Host string Port string Name string User string Password string SSLMode string BinaryParameters string // lib/pq setting for prepared statements in pgbouncer StatementCacheMode string MaxConnections string }
Start Config -------------------------------------------------
type DBQuery ¶
type DBQuery interface { Exec(ctx context.Context, sql string, arguments ...interface{}) (pgconn.CommandTag, error) Query(ctx context.Context, sql string, optionsAndArgs ...interface{}) (pgx.Rows, error) QueryRow(ctx context.Context, sql string, optionsAndArgs ...interface{}) pgx.Row Begin(ctx context.Context) (pgx.Tx, error) BeginTx(ctx context.Context, txOptions pgx.TxOptions) (pgx.Tx, error) SendBatch(ctx context.Context, b *pgx.Batch) pgx.BatchResults Close() types.SQLLogger }
Start Connect -------------------------------------------------
Click to show internal directories.
Click to hide internal directories.