Documentation ¶
Index ¶
- Variables
- func NewGoQuConnector(poolDB map[string]*sqlx.DB, logger *zap.Logger, cfg *config.Config) map[string]connectors.DBConnector[*goqu.Database, *goqu.TxDatabase]
- func NewPGXPool(ctx context.Context, config PostgresConfig) (map[string]*pgxpool.Pool, error)
- func NewPGXPoolConn(ctx context.Context, pgxPool map[string]*pgxpool.Pool, logger *zap.Logger, ...) (map[string]connectors.DBConnector[dbtypes.PgxConn, dbtypes.PgxTx], error)
- func NewPostgres(config PostgresConfig) (map[string]*sqlx.DB, error)
- func NewSQLConnector(poolDB map[string]*sqlx.DB, logger *zap.Logger, cfg *config.Config) map[string]connectors.DBConnector[*sqlx.DB, *sqlx.Tx]
- type DBConfig
- type GoQuConn
- type PGXPoolConn
- func (c *PGXPoolConn) CallContext(ctx context.Context, queryName string, ...) error
- func (c *PGXPoolConn) CallTransaction(ctx context.Context, txName string, ...) error
- func (c *PGXPoolConn) Get(ctx context.Context, dst any, query string, args ...any) error
- func (c *PGXPoolConn) Select(ctx context.Context, dst any, query string, args ...any) error
- func (c *PGXPoolConn) Stats() sql.DBStats
- type PostgresConfig
- type SQLConn
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = types.Module{ {CreateFunc: NewPostgresConfig}, {CreateFunc: NewPostgres}, {CreateFunc: NewSQLConnector}, {CreateFunc: NewGoQuConnector}, {CreateFunc: NewPGXPoolConn}, {CreateFunc: NewPGXPool}, }
Functions ¶
func NewGoQuConnector ¶
func NewGoQuConnector( poolDB map[string]*sqlx.DB, logger *zap.Logger, cfg *config.Config, ) map[string]connectors.DBConnector[*goqu.Database, *goqu.TxDatabase]
func NewPGXPool ¶ added in v1.0.7
func NewPGXPoolConn ¶ added in v1.0.7
func NewPostgres ¶
func NewPostgres(config PostgresConfig) (map[string]*sqlx.DB, error)
Types ¶
type GoQuConn ¶
type GoQuConn struct {
// contains filtered or unexported fields
}
func (*GoQuConn) CallContext ¶
type PGXPoolConn ¶ added in v1.0.7
func (*PGXPoolConn) CallContext ¶ added in v1.0.7
func (*PGXPoolConn) CallTransaction ¶ added in v1.0.7
func (*PGXPoolConn) Stats ¶ added in v1.0.7
func (c *PGXPoolConn) Stats() sql.DBStats
type PostgresConfig ¶
type PostgresConfig struct {
Configs []DBConfig
}
func NewPostgresConfig ¶
func NewPostgresConfig(cfg *config.Config) PostgresConfig
type SQLConn ¶
type SQLConn struct {
// contains filtered or unexported fields
}
func (*SQLConn) CallContext ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.