generic

package
v2.2.7 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteQuery added in v2.2.6

func ExecuteQuery(ctx context.Context, query string, params ...interface{}) error

func GetRow

func GetRow[ROW any](ctx context.Context, query string, params ...interface{}) (row *ROW, err error)

func GetRows

func GetRows[ROW any](ctx context.Context, query string, params ...interface{}) (rows []*ROW, err error)

func SetTracer added in v2.2.0

func SetTracer(tr tracing.Tracer)

func Using

func Using(ctx context.Context, query DBContextFunction) error

func UsingGetRow

func UsingGetRow[ROW any](ctx context.Context, query string, params ...interface{}) (row *ROW, err error)

func UsingGetRows

func UsingGetRows[ROW any](ctx context.Context, query string, params ...interface{}) (rows []*ROW, err error)

Types

type DBContextFunction

type DBContextFunction func(ctx context.Context) error

type DBContextWithTransactionFunction

type DBContextWithTransactionFunction = func(ctx context.Context) error

Jump to

Keyboard shortcuts

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