database

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQL

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

func NewSQL

func NewSQL(driver string, dsn string) (*SQL, error)

func (*SQL) Close

func (db *SQL) Close() error

func (*SQL) Exec

func (db *SQL) Exec(ctx context.Context, query string, args ...any) (int64, error)

func (*SQL) ExecNamed

func (db *SQL) ExecNamed(ctx context.Context, query string, arg any) (int64, error)

func (*SQL) Find

func (db *SQL) Find(ctx context.Context, query string, dest any, args ...any) error

func (*SQL) FindNamed

func (db *SQL) FindNamed(ctx context.Context, query string, dest any, arg any) error

func (*SQL) Ping

func (db *SQL) Ping(ctx context.Context) error

func (*SQL) Select

func (db *SQL) Select(ctx context.Context, query string, dest any, args ...any) error

func (*SQL) SelectNamed

func (db *SQL) SelectNamed(ctx context.Context, query string, dest any, arg any) error

func (*SQL) WithTransaction

func (db *SQL) WithTransaction(ctx context.Context, fn func(tx contract.Database) error) error

Jump to

Keyboard shortcuts

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