Documentation
¶
Overview ¶
Package postgres provides GraphJin's PostgreSQL connection adapter, built on jackc/pgx/v5.
It is a separate module so that consumers who only need SQLite can build without pgx, and vice versa: the adapter registers nothing globally; the service layer selects it by database type.
Index ¶
Constants ¶
View Source
const DriverPostgres = "pgx"
DriverPostgres is the database/sql driver name (pgx stdlib).
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
ConnString string
Host string
Port uint16
User string
Password string
DBName string
Schema string
AppName string
OpenDBName bool
EnableTLS bool
ServerName string
ServerCert string
// GetFile loads server_cert content when ServerCert is not inline PEM.
// Optional: nil means "cert must be inline PEM".
GetFile func(path string) ([]byte, error)
}
Options configures a PostgreSQL connection.
Click to show internal directories.
Click to hide internal directories.