Documentation
¶
Index ¶
- Variables
- func Exec(db *pgx.Conn, query string, args ...any) error
- func ExecContext(ctx context.Context, db *pgx.Conn, query string, args ...any) error
- func Query[T any](db *pgx.Conn, query string, scanner func(r pgx.Rows, v *T) error, args ...any) ([]T, error)
- func QueryContext[T any](ctx context.Context, db *pgx.Conn, query string, ...) ([]T, error)
- func QueryRow(db *pgx.Conn, query string, scanner func(r pgx.Row) error, args ...any) error
- func QueryRowContext(ctx context.Context, db *pgx.Conn, query string, scanner func(r pgx.Row) error, ...) error
- type ConnString
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConnString = ConnString{"POSTGRES_HOSTNAME", "DB_PORT", "POSTGRES_USER", "POSTGRES_PASSWORD", "POSTGRES_DB", "SSL_MODE"}
Environment Variables
host=POSTGRES_HOSTNAME port=DB_PORT user=POSGRES_USER password=POSTGRES_PASSWORD dbname=POSTGRES_DB sslmode=SSL_MODE
Functions ¶
func ExecContext ¶
func QueryContext ¶
Types ¶
type ConnString ¶
type ConnString struct {
// contains filtered or unexported fields
}
func NewConnString ¶
func NewConnString(hostname, port, username, password, dbName, sslMode string) *ConnString
func (*ConnString) ExpandEnv ¶
func (c *ConnString) ExpandEnv() string
func (*ConnString) String ¶
func (c *ConnString) String() string
Click to show internal directories.
Click to hide internal directories.