Documentation ¶
Index ¶
- Variables
- func Error(err error) error
- func Get[T any](ctx context.Context, database *Database, builder squirrel.SelectBuilder) (*T, error)
- func NewConfig(url string, l *zap.Logger) (*pgxpool.Config, error)
- func Select[T any](ctx context.Context, database *Database, builder squirrel.SelectBuilder) ([]T, error)
- type Database
- func (r Database) Delete(ctx context.Context, builder squirrel.DeleteBuilder) (rowsAffected int64, err error)
- func (r Database) ExecuteRaw(ctx context.Context, sql string, args ...any) (rowsAffected int64, err error)
- func (r Database) GetRaw(ctx context.Context, dst any, sql string, args ...any) error
- func (r Database) Insert(ctx context.Context, builder squirrel.InsertBuilder) (rowsAffected int64, err error)
- func (r Database) QueryBuilder() query.Builder
- func (r Database) SelectRaw(ctx context.Context, dst any, sql string, args ...any) error
- func (r Database) Transaction(ctx context.Context) (pgx.Tx, error)
- func (r Database) Update(ctx context.Context, builder squirrel.UpdateBuilder) (rowsAffected int64, err error)
- func (r Database) WithTx(ctx context.Context, ...) error
- type Logger
- type Table
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func (Database) ExecuteRaw ¶
func (Database) QueryBuilder ¶
Click to show internal directories.
Click to hide internal directories.