sql

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(db *sql.DB, query string, args ...any) error

func ExecContext

func ExecContext(ctx context.Context, db *sql.DB, query string, args ...any) error

func Query

func Query[T any](db *sql.DB, callback func(rows *sql.Rows, v *T) error, query string, args ...any) ([]T, error)

func QueryContext

func QueryContext[T any](ctx context.Context, db *sql.DB, scanner func(rows *sql.Rows, v *T) error, query string, args ...any) ([]T, error)

func QueryRow

func QueryRow(db *sql.DB, scanner func(row *sql.Row) error, query string, args ...any) error

func QueryRowContext

func QueryRowContext(ctx context.Context, db *sql.DB, scanner func(row *sql.Row) error, query string, args ...any) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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