sequence

package
v0.26.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Max

type Max struct{}

Max represents struct used to setting new autoincrement value using simple "SELECT MAX(ID)" approach

func (*Max) CanUse

func (n *Max) CanUse(iopts ...interface{}) bool

CanUse returns true if Handle function can be executed

func (*Max) Handle

func (n *Max) Handle(ctx context.Context, db *sql.DB, target interface{}, iopts ...interface{}) (doNext bool, err error)

Handle sets new autoincrement value using simple "SELECT MAX(ID)" approach

type Metadata added in v0.26.0

type Metadata struct{}

Metadata owns read-only physical sequence identity for SQLite. A numeric MAX allocation may target a table with no sqlite_sequence entry yet.

func (*Metadata) CanUse added in v0.26.0

func (n *Metadata) CanUse(options ...interface{}) bool

func (*Metadata) Handle added in v0.26.0

func (n *Metadata) Handle(ctx context.Context, db *sql.DB, target interface{}, opts ...interface{}) (bool, error)

type Next added in v0.2.2

type Next struct{}

Next reserves a durable SQLite range without inserting entity rows. A supplied transaction retains completion ownership; its reservation is pending until that owner commits. MAX allocation remains a separate read-only strategy.

func (*Next) CanUse added in v0.2.2

func (n *Next) CanUse(opts ...interface{}) bool

func (*Next) Handle added in v0.2.2

func (n *Next) Handle(ctx context.Context, db *sql.DB, target interface{}, opts ...interface{}) (bool, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL