Documentation ¶
Index ¶
- Variables
- type PostgreSQL
- func (pg *PostgreSQL) Connect(ctx context.Context, connString string) error
- func (pg PostgreSQL) Exec(ctx context.Context, sql string, args ...any) (pgconn.CommandTag, error)
- func (pg PostgreSQL) Query(ctx context.Context, sql string, args ...any) (pgx.Rows, error)
- func (pg PostgreSQL) QueryAll(ctx context.Context, dst interface{}, sql string, args ...interface{}) error
- func (pg PostgreSQL) QueryOne(ctx context.Context, dst interface{}, sql string, args ...interface{}) error
- func (pg PostgreSQL) ScanAll(dst any, rows pgx.Rows) error
- func (pg PostgreSQL) ScanOne(dst any, rows pgx.Rows) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("item not found")
Functions ¶
This section is empty.
Types ¶
type PostgreSQL ¶
type PostgreSQL struct {
// contains filtered or unexported fields
}
func New ¶
func New() *PostgreSQL
func (*PostgreSQL) Connect ¶
func (pg *PostgreSQL) Connect(ctx context.Context, connString string) error
func (PostgreSQL) Exec ¶
func (pg PostgreSQL) Exec(ctx context.Context, sql string, args ...any) (pgconn.CommandTag, error)
func (PostgreSQL) QueryAll ¶
func (pg PostgreSQL) QueryAll(ctx context.Context, dst interface{}, sql string, args ...interface{}) error
func (PostgreSQL) QueryOne ¶
func (pg PostgreSQL) QueryOne(ctx context.Context, dst interface{}, sql string, args ...interface{}) error
func (PostgreSQL) ScanAll ¶
func (pg PostgreSQL) ScanAll(dst any, rows pgx.Rows) error
func (PostgreSQL) ScanOne ¶
func (pg PostgreSQL) ScanOne(dst any, rows pgx.Rows) error
Click to show internal directories.
Click to hide internal directories.