generic

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 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