Documentation ¶
Index ¶
- Variables
- func BoolFromBoolean(v bool) pgtype.Bool
- func DeferRollback(ctx context.Context, l *zerolog.Logger, rollback func(context.Context) error)
- func DurationToPgInterval(d time.Duration) pgtype.Interval
- func PrepareTx(ctx context.Context, pool *pgxpool.Pool, l *zerolog.Logger, timeoutMs int) (pgx.Tx, func(context.Context) error, func(), error)
- func TextFromStr(str string) pgtype.Text
- func TimestampFromTime(t time.Time) pgtype.Timestamp
- func ToInt(i int32) pgtype.Int4
- func UUIDFromStr(uuid string) pgtype.UUID
- func UUIDToStr(uuid pgtype.UUID) string
- func UniqueSet(uuids []pgtype.UUID) []pgtype.UUID
Constants ¶
This section is empty.
Variables ¶
View Source
var DeadlockRetry = func(l *zerolog.Logger, f func() error) error { return genericRetry(l.Warn(), 3, f, "deadlock", func(err error) (bool, error) { return strings.Contains(err.Error(), "deadlock detected"), err }, 50*time.Millisecond, 200*time.Millisecond) }
Functions ¶
func BoolFromBoolean ¶ added in v0.34.1
func DeferRollback ¶ added in v0.50.0
func DurationToPgInterval ¶ added in v0.50.0
func TextFromStr ¶
func UUIDFromStr ¶
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.