database

package
v0.0.0-...-3d8a049 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcquireTryLock

func AcquireTryLock(ctx context.Context, tx *sqlx.Tx, lockID, entityID int32) (bool, error)

func NewConnection

func NewConnection(dsn, driver string) (*sqlx.DB, error)

NewConnection returns a new database connection.

func WithTx

func WithTx(ctx context.Context, db *sqlx.DB, fn WithTxFunc) error

Types

type WithTxFunc

type WithTxFunc func(ctx context.Context, tx *sqlx.Tx) error

Jump to

Keyboard shortcuts

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