postgres

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get() driverNs.IDriver

Types

type LockLevel added in v1.4.0

type LockLevel int
const (
	LockLevelSession     LockLevel = 1
	LockLevelTransaction LockLevel = 2
)

type Option added in v1.4.0

type Option struct {
	internal.Option
	// Id for pg_advisory_lock or pg_advisory_xact_lock
	LockId int64
	// Lock level
	LockLevel LockLevel
	// Self DB
	DB *sql.DB
	// Self transaction
	Tx *sql.Tx
}

func MakeOption added in v1.4.0

func MakeOption() Option

func (Option) WithDatabase added in v1.5.0

func (a Option) WithDatabase(db *sql.DB) Option

func (Option) WithLockId added in v1.5.0

func (a Option) WithLockId(v int64) Option

func (Option) WithLockLevelSession added in v1.5.0

func (a Option) WithLockLevelSession() Option

func (Option) WithLockLevelTransaction added in v1.5.0

func (a Option) WithLockLevelTransaction() Option

func (Option) WithTransaction added in v1.5.0

func (a Option) WithTransaction(tx *sql.Tx) Option

Jump to

Keyboard shortcuts

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