Documentation ¶
Index ¶
- Variables
- func Builder() sq.StatementBuilderType
- func Connect(ctx context.Context, pgDsn string) (*pgxpool.Pool, error)
- func Exec[T any](ctx context.Context, db pgxscan.Querier, sqlizer sq.Sqlizer) (*T, error)
- func ExecWithOutbox(ctx context.Context, db *pgxpool.Pool, dst Model, sqlizer sq.Sqlizer) error
- func Select[T any](ctx context.Context, db pgxscan.Querier, sqlizer sq.Sqlizer) ([]*T, error)
- func WithTransaction(ctx context.Context, pool *pgxpool.Pool, callback func(tx pgx.Tx) error) error
- type Model
- type Pagination
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("entity not found") ErrAlreadyExists = errors.New("entity already exists") )
Functions ¶
func Builder ¶
func Builder() sq.StatementBuilderType
func ExecWithOutbox ¶
Types ¶
type Pagination ¶
type Pagination struct {
// contains filtered or unexported fields
}
func NewPagination ¶
func NewPagination(page, perPage uint64) Pagination
func (*Pagination) Limit ¶
func (p *Pagination) Limit() uint64
func (*Pagination) Offset ¶
func (p *Pagination) Offset() uint64
Click to show internal directories.
Click to hide internal directories.