database

package
v0.0.0-...-d2da372 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataManager

type DataManager interface {
	Repo
	Begin() (TransactionManager, error)
	Close() error
}

type Executor

type Executor interface {
	SelectContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error
	Select(dest interface{}, query string, args ...interface{}) error
	ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
	Exec(query string, args ...any) (sql.Result, error)
	Rebind(string) string
}

type Repo

type Repo interface {
	Client() repository.Client
	Transaction() repository.Transaction
}

type TransactionManager

type TransactionManager interface {
	Repo
	Rollback() error
	Commit() error
	GetDBTransaction() *sqlx.Tx
}

TransactionManager holds the methods that manipulates the main data, from within a transaction.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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