Documentation
¶
Overview ¶
Package sequence owns transaction-bound scoped numeric allocation.
Index ¶
Constants ¶
View Source
const LedgerTable = "sqlx_scoped_sequences"
Variables ¶
This section is empty.
Functions ¶
func Collision ¶
func Collision(ctx context.Context, db *sql.DB, dialect, table, column string, scope []Scope, value int64, identity []Scope) (bool, error)
Collision verifies that a generated scope/value was taken by another row and that the requested row identity is still absent. This prevents replay from turning a concurrent primary-key insert into an unintended UPDATE.
func Provision ¶
Provision creates the counter table. MySQL callers provision before starting business transactions: DDL must never implicitly commit a caller transaction.
Types ¶
Click to show internal directories.
Click to hide internal directories.