postgres

package
v0.0.0-...-240d691 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IsolationLevels = map[string]sql.IsolationLevel{
	"Default":        sql.LevelDefault,
	"ReadUncommitte": sql.LevelReadUncommitted,
	"ReadCommitted":  sql.LevelReadCommitted,
	"WriteCommitted": sql.LevelWriteCommitted,
	"RepeatableRead": sql.LevelRepeatableRead,
	"Snapshot":       sql.LevelSnapshot,
	"Serializable":   sql.LevelSerializable,
	"Linearizable":   sql.LevelLinearizable,
}

Functions

This section is empty.

Types

type DB

type DB struct {
	*sqlx.DB
	// contains filtered or unexported fields
}

func NewDB

func NewDB(connString string, isolationLevel string) (*DB, error)

func (*DB) Begintx

func (db *DB) Begintx(ctx context.Context) (*sqlx.Tx, error)

Jump to

Keyboard shortcuts

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