Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*PGInit)
Option configures PGInit behavior.
func WithCustomTypes ¶
func WithDecimalType ¶
func WithDecimalType() Option
WithDecimalType set pgx decimal type to ericlagergren/decimal.
func WithLogger ¶
WithLogger Add logger to pgx. if the request context contains request id, can pass in the request id context key to reqIDKeyFromCtx and logger will log with the request id. Only will log if the log level is equal and above pgx.LogLevelWarn.
type PGInit ¶
type PGInit struct {
// contains filtered or unexported fields
}
PGInit provides capabilities for connect to postgres with pgx.pool.
func New ¶
New initializes a PGInit using the provided Config and options. If opts is not provided it will initializes PGInit with default configuration.
func (*PGInit) ConnConfig ¶
func (pgi *PGInit) ConnConfig() *pgx.ConnConfig
Click to show internal directories.
Click to hide internal directories.