README ¶ psql Basic psql wrapper for PGX and Scany with mocks Expand ▾ Collapse ▴ Documentation ¶ Index ¶ type CommandTag type Config type Conn type DB func New(ctx context.Context, cxn string) (DB, error) func NewWithConfig(ctx context.Context, cfg *Config) (DB, error) type Queryer type Tx Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type CommandTag ¶ type CommandTag interface { fmt.Stringer RowsAffected() int64 Insert() bool Update() bool Delete() bool Select() bool } type Config ¶ type Config = pgxpool.Config type Conn ¶ type Conn interface { Queryer Exec(ctx context.Context, stmt string, args ...any) (CommandTag, error) } type DB ¶ type DB interface { Conn io.Closer Ping(ctx context.Context) error Begin(ctx context.Context) (Tx, error) } func New ¶ func New(ctx context.Context, cxn string) (DB, error) func NewWithConfig ¶ func NewWithConfig(ctx context.Context, cfg *Config) (DB, error) type Queryer ¶ type Queryer interface { Query(ctx context.Context, dst any, query string, args ...any) error QueryRow(ctx context.Context, dst any, query string, args ...any) error } type Tx ¶ type Tx interface { Conn Commit(ctx context.Context) error Rollback(ctx context.Context) error } Source Files ¶ View all Source files db.go pgxpool.go pgxscan.go pgxtx.go Directories ¶ Show internal Expand all Path Synopsis mock Click to show internal directories. Click to hide internal directories.