Documentation
¶
Index ¶
- type PgXWrapper
- type PgxWrappedDatabase
- type PostgresDatabase
- func (d *PostgresDatabase) Destruct()
- func (d *PostgresDatabase) Exec(ctx context.Context, sql string, args ...interface{}) (pgconn.CommandTag, error)
- func (d *PostgresDatabase) Get(sql string, args ...interface{}) QueryInterface
- func (d *PostgresDatabase) Select(sql string, args ...interface{}) QueryInterface
- type PostgresDatabaseInterface
- type Query
- type QueryInterface
- type SqlError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PgXWrapper ¶
func (*PgXWrapper) Exec ¶
func (w *PgXWrapper) Exec( ctx context.Context, sqlQuery string, args ...interface{}, ) (pgconn.CommandTag, error)
type PgxWrappedDatabase ¶
type PostgresDatabase ¶
type PostgresDatabase struct { PgX PgxWrappedDatabase PgxConfig *pgxpool.Config // contains filtered or unexported fields }
func NewPostgresDatabase ¶
func NewPostgresDatabase(dsn string) *PostgresDatabase
func (*PostgresDatabase) Destruct ¶
func (d *PostgresDatabase) Destruct()
func (*PostgresDatabase) Exec ¶
func (d *PostgresDatabase) Exec( ctx context.Context, sql string, args ...interface{}, ) (pgconn.CommandTag, error)
func (*PostgresDatabase) Get ¶
func (d *PostgresDatabase) Get(sql string, args ...interface{}) QueryInterface
func (*PostgresDatabase) Select ¶
func (d *PostgresDatabase) Select(sql string, args ...interface{}) QueryInterface
type PostgresDatabaseInterface ¶
type PostgresDatabaseInterface interface { Exec(ctx context.Context, sql string, arguments ...any) (pgconn.CommandTag, error) Select(sql string, args ...interface{}) QueryInterface Get(sql string, args ...interface{}) QueryInterface }
PostgresDatabaseInterface - TODO: Remove after move to utility library
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
func (*Query) Scan ¶
func (q *Query) Scan(dest ...interface{}) QueryInterface
func (*Query) ScanCol ¶
func (q *Query) ScanCol(dest ...interface{}) QueryInterface
type QueryInterface ¶
type QueryInterface interface { Scan(dest ...interface{}) QueryInterface ScanCol(dest ...interface{}) QueryInterface Exec(ctx context.Context) error }
Click to show internal directories.
Click to hide internal directories.