db

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func New

func New(ctx context.Context, dbPath string) (*Manager, error)

func (*Manager) Close

func (m *Manager) Close() error

func (*Manager) DB

func (m *Manager) DB(ctx context.Context) QueryManager

type Provider

type Provider interface {
	DB(ctx context.Context) QueryManager
}

type QueryManager

type QueryManager interface {
	Query(ctx context.Context, sql string, args ...interface{}) (*db_pool.Rows, error)
	Exec(ctx context.Context, sql string, args ...interface{}) (*db_pool.Result, error)
}

Jump to

Keyboard shortcuts

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