Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New creates a new connection to the PostgreSQL database and applies the provided configuration options.
func RunMigrations ¶
RunMigrations applies the database migrations from the specified path using the provided Data Source Name (DSN).
Types ¶
type Option ¶
Option represents a functional option for configuring the database connection.
func WithConnMaxIdleTime ¶
WithConnMaxIdleTime sets the maximum idle time for a connection in the pool.
func WithConnMaxLifetime ¶
WithConnMaxLifetime sets the maximum lifetime of a connection before it is closed.
func WithMaxIdleConns ¶
WithMaxIdleConns sets the maximum number of idle connections allowed in the pool.
func WithMaxOpenConns ¶
WithMaxOpenConns sets the maximum number of open connections in the pool.
Click to show internal directories.
Click to hide internal directories.