database

package
v0.0.0-...-4e8521e Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(driver, host, port, user, password, dbname, sslmode string) (*sql.DB, error)

func New

func New(
	sqlDB *sql.DB, logger logger.Logger,
) repository.Database

func NewTxManager

func NewTxManager(db *sql.DB) transaction.TxManager

func NewURLRepo

func NewURLRepo(
	extractRWTx func(transaction.RWTx) (*RwTx, error),
) repository.URLRepository

Types

type RwTx

type RwTx struct {
	*sql.Tx
}

func ExtractRWTx

func ExtractRWTx(tx transaction.RWTx) (*RwTx, error)

func (*RwTx) ROTxImpl

func (t *RwTx) ROTxImpl()

func (*RwTx) RWTxImpl

func (t *RwTx) RWTxImpl()

Jump to

Keyboard shortcuts

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