sqlx

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEditTargetIDNotFound = fmt.Errorf("edit target not found")

Functions

This section is empty.

Types

type Joins

type Joins interface {
	// Each calls the provided function on each of the concrete (not pointer)
	// objects in the slice.
	Each(func(interface{}))

	// Add adds a new object to the slice. It is assumed that the passed
	// object can be type asserted to the correct type.
	Add(interface{})
}

Joins is the interface implemented by slices of join objects.

type Model

type Model interface {
	// GetID returns the ID of the object.
	GetID() uuid.UUID
}

Model is the interface implemented by objects that exist in the database that have an `id` column.

type Models

type Models interface {
	// Add adds a new object to the slice. It is assumed that the passed
	// object can be type asserted to the correct type.
	Add(interface{})
}

Models is the interface implemented by slices of Model objects.

type TxnMgr

type TxnMgr struct {
	// contains filtered or unexported fields
}

TxnMgr manages transaction boundaries and provides access to Repo objects.

func NewTxnMgr

func NewTxnMgr(db *sqlx.DB) *TxnMgr

NewTxnMgr returns a new instance of TxnMgr.

func (*TxnMgr) New

func (m *TxnMgr) New() txn.State

func (*TxnMgr) Repo

func (m *TxnMgr) Repo() models.Repo

Repo creates a new TxnState object and initialises the Repo with it.

Jump to

Keyboard shortcuts

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