database

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Source    string
	Query     string
	Arguments string
}

Entry represents an SQL.

type Manager

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

Manager manages database.

func New

func New(db3Path string) (*Manager, error)

New returns prepared Manager.

func (*Manager) Close

func (m *Manager) Close() error

Close closes connection.

func (*Manager) SetLogger

func (m *Manager) SetLogger(w io.Writer)

SetLogger sets logger for debugging.

func (*Manager) Transaction

func (m *Manager) Transaction(ctx context.Context, fn TransactionalExecutable) (err error)

Transaction begins transaction with given context.

type SQLBuffer

type SQLBuffer struct {
	Entries []Entry
	Logger  *log.Logger
	// contains filtered or unexported fields
}

SQLBuffer records queries.

func (*SQLBuffer) Write

func (v *SQLBuffer) Write(p []byte) (int, error)

Write implements io.Writer.

type TransactionalExecutable

type TransactionalExecutable func(context.Context, boil.ContextTransactor) error

TransactionalExecutable represents a callback function.

Jump to

Keyboard shortcuts

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