Versions in this module Expand all Collapse all v1 v1.0.2 Feb 7, 2022 v1.0.1 Nov 4, 2021 Changes in this version + const OnConflictDoNothing + var QueryLoggingDisabled bool + func ConnectAndExecute(uri string, dbFunc func(*sql.DB) error) (outerErr error) + func CopyFromChan(c <-chan RowItem) pgx.CopyFromSource + func CreateDB(dbName string) error + func CreateDBIfNotExists(dbName string) error + func DBConnURI(dbName string) string + func DropDB(dbName string) error + func NullIsEmpty(s *string) sql.Scanner + func NullPtr(p interface{}) nullPtr + func ResetDB(ctx context.Context, db *DB) error + func StructScanner(s interface{}) func(p interface{}) []interface + func TestDataPath(rel string) string + func TryToMigrate(dbName string) (isMigrationError bool, outerErr error) + type DB struct + func New(db *sql.DB, instanceID string) *DB + func Open(driverName, dbinfo, instanceID string) (_ *DB, err error) + func (db *DB) BulkInsert(ctx context.Context, table string, columns []string, values []interface{}, ...) (err error) + func (db *DB) BulkInsertReturning(ctx context.Context, table string, columns []string, values []interface{}, ...) (err error) + func (db *DB) BulkUpdate(ctx context.Context, table string, columns, types []string, ...) (err error) + func (db *DB) BulkUpsert(ctx context.Context, table string, columns []string, values []interface{}, ...) error + func (db *DB) BulkUpsertReturning(ctx context.Context, table string, columns []string, values []interface{}, ...) error + func (db *DB) Close() error + func (db *DB) CollectInts(ctx context.Context, query string, args ...interface{}) (ints []int, err error) + func (db *DB) CollectStrings(ctx context.Context, query string, args ...interface{}) (ss []string, err error) + func (db *DB) CollectStructs(ctx context.Context, pslice interface{}, query string, args ...interface{}) error + func (db *DB) CopyInsert(ctx context.Context, table string, columns []string, src pgx.CopyFromSource, ...) (err error) + func (db *DB) CopyUpsert(ctx context.Context, table string, columns []string, src pgx.CopyFromSource, ...) (err error) + func (db *DB) Exec(ctx context.Context, query string, args ...interface{}) (_ int64, err error) + func (db *DB) InTransaction() bool + func (db *DB) IsRetryable() bool + func (db *DB) MaxRetries() int + func (db *DB) Ping() error + func (db *DB) Prepare(ctx context.Context, query string) (*sql.Stmt, error) + func (db *DB) Query(ctx context.Context, query string, args ...interface{}) (_ *sql.Rows, err error) + func (db *DB) QueryRow(ctx context.Context, query string, args ...interface{}) *sql.Row + func (db *DB) RunQuery(ctx context.Context, query string, f func(*sql.Rows) error, ...) error + func (db *DB) RunQueryIncrementally(ctx context.Context, query string, batchSize int, f func(*sql.Rows) error, ...) (err error) + func (db *DB) Transact(ctx context.Context, iso sql.IsolationLevel, txFunc func(*DB) error) (err error) + func (db *DB) WithPGXConn(f func(conn *pgx.Conn) error) error + type MultiErr []error + func (m MultiErr) Error() string + type RowItem struct + Err error + Values []interface{}