db

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Db

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

func New

func New(connectionString string) *Db

func (*Db) Connect

func (db *Db) Connect() (err error)

func (Db) Connection

func (db Db) Connection() *sql.DB

func (Db) Exec

func (db Db) Exec(query string, args ...any) (sql.Result, error)

func (Db) ExecInTx

func (db Db) ExecInTx(f func(*sql.Tx) error) error

func (Db) Query

func (db Db) Query(query string, args ...any) (*sql.Rows, error)

func (Db) Truncate

func (db Db) Truncate(table string) (sql.Result, error)

Jump to

Keyboard shortcuts

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