Documentation
¶
Index ¶
- Variables
- func AdjustRelation[S interface{ ... }](prev, next []S, addFn, removeFn ChangeRelationFunc[S]) error
- func InTransaction(ctx context.Context, db *pgxpool.Pool, ...) error
- func IsForeignKeyViolation(err error, name string) bool
- func IsNoRows(err error) bool
- func IsUniqueViolation(err error, name string) bool
- func NotValidEnumType(err error) bool
- func QueryBatch(b *pgx.Batch, sb squirrel.Sqlizer) error
- func ReassignPositions[S ~[]E, E Positioner, Q Queryable](q Q, elements S, updateFn ChangePositionsFunc[Q, E]) error
- func WithTransaction(ctx context.Context, tx pgx.Tx) context.Context
- type ChangePositionsFunc
- type ChangeRelationFunc
- type Keyer
- type Positioner
- type Queryable
Constants ¶
This section is empty.
Variables ¶
View Source
var StatementBuilder = squirrel.StatementBuilderType(builder.EmptyBuilder).PlaceholderFormat(squirrel.Dollar)
View Source
var TxContextKey contextKey = struct{}{}
Functions ¶
func AdjustRelation ¶
func AdjustRelation[S interface {
Keyer
comparable
}](
prev, next []S,
addFn, removeFn ChangeRelationFunc[S],
) error
func InTransaction ¶
func IsForeignKeyViolation ¶
func IsUniqueViolation ¶
func NotValidEnumType ¶
func ReassignPositions ¶
func ReassignPositions[S ~[]E, E Positioner, Q Queryable](q Q, elements S, updateFn ChangePositionsFunc[Q, E]) error
Types ¶
type ChangePositionsFunc ¶
type ChangeRelationFunc ¶
type Positioner ¶
Click to show internal directories.
Click to hide internal directories.