sequence

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Next

type Next struct{}

Next represents struct used to setting new autoincrement value using insert inside new transaction finished by rollback

func (*Next) CanUse

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

CanUse returns true if Handle function can be executed

func (*Next) Handle

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

Handle sets new autoincrement value by inserting row using new transaction finished by rollback, uses locking

Jump to

Keyboard shortcuts

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