Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Module("postgressqlxfx", fx.Provide(NewSqlxConn, provideConfig), fx.Invoke(registerHooks), )
Module provided to fxlog https://uber-go.github.io/fx/modules.html
Functions ¶
This section is empty.
Types ¶
type PostgresSqlxOptions ¶
type Sqlx ¶
type Sqlx struct { SqlxDB *sqlx.DB DB *sql.DB SquirrelBuilder squirrel.StatementBuilderType GoquBuilder *goqu.SelectDataset // contains filtered or unexported fields }
func NewSqlxConn ¶
func NewSqlxConn(cfg *PostgresSqlxOptions) (*Sqlx, error)
NewSqlxConn creates a database connection with appropriate pool configuration and runs migration to prepare database.
Migration will be omitted if appropriate config parameter set.
Click to show internal directories.
Click to hide internal directories.