database

package
v0.0.0-...-d5de6aa Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseConnections

func CloseConnections()

func OpenConnections

func OpenConnections(cfg *config.Database)

Types

type Tx

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

func NewTx

func NewTx(ctx context.Context) (tx *Tx, err error)

func (*Tx) Commit

func (t *Tx) Commit() (erro error)

func (*Tx) Execute

func (t *Tx) Execute(query string, args ...any) (sql.Result, error)

func (*Tx) Query

func (t *Tx) Query(query string, args ...any) (*sql.Rows, error)

func (*Tx) QueryRow

func (t *Tx) QueryRow(query string, args ...any) *sql.Row

func (*Tx) Rollback

func (t *Tx) Rollback()

Jump to

Keyboard shortcuts

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