Documentation ¶
Index ¶
- func WithTx(ctx context.Context, db *pgxpool.Tx, fn WithTxFunc) error
- type BatchResults
- type Database
- func (db *Database) Close()
- func (db *Database) Exec(ctx context.Context, query string, args ...any) error
- func (db *Database) Query(ctx context.Context, query string, args ...any) (cluster.Rows, error)
- func (db *Database) SendBatch(ctx context.Context, queries []*cluster.Query) cluster.BatchResults
- func (db *Database) Stdlib() *sql.DB
- type RowsAdapter
- type WithTxFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BatchResults ¶
type BatchResults struct {
pgx.BatchResults
}
func NewBatchResultsAdapter ¶
func NewBatchResultsAdapter(b pgx.BatchResults) *BatchResults
func (*BatchResults) Close ¶
func (b *BatchResults) Close() error
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func NewDatabase ¶
type RowsAdapter ¶
type RowsAdapter struct {
pgx.Rows
}
RowsAdapter makes pgx.Rows compliant with the dbsql.Rows interface. See dbsql.Rows for details.
func NewRowsAdapter ¶
func NewRowsAdapter(rows pgx.Rows) *RowsAdapter
NewRowsAdapter returns a new rowsAdapter instance.
func (RowsAdapter) Close ¶
func (ra RowsAdapter) Close() error
Close implements the dbscan.Rows.Close method.
func (RowsAdapter) Columns ¶
func (ra RowsAdapter) Columns() ([]string, error)
Columns implements the dbscan.Rows.Columns method.
func (RowsAdapter) NextResultSet ¶
func (ra RowsAdapter) NextResultSet() bool
NextResultSet is currently always returning false.
func (RowsAdapter) Types ¶
func (ra RowsAdapter) Types() ([]string, error)
type WithTxFunc ¶
WithTxFunc represents a function that will be executed within transaction.
Click to show internal directories.
Click to hide internal directories.