db

package
v0.0.0-...-31ad618 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Unlicense Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Context *sql.DB

Functions

func QueryRows

func QueryRows(q RowsQuery, query string, values ...any) rows

func QueryRowsContext

func QueryRowsContext(ctx context.Context, q RowsQueryContext, query string, values ...any) rows

Types

type Q

type Q interface {
	Exec(query string, args ...interface{}) (sql.Result, error)
	Query(query string, args ...interface{}) (*sql.Rows, error)
	QueryRow(query string, args ...interface{}) *sql.Row
	Prepare(string) (*sql.Stmt, error)
}

Standard set of database operations

type RowsQuery

type RowsQuery interface {
	Query(string, ...any) (*sql.Rows, error)
}

type RowsQueryContext

type RowsQueryContext interface {
	QueryContext(context.Context, string, ...any) (*sql.Rows, error)
}

type Scanner

type Scanner func(...any) error

Jump to

Keyboard shortcuts

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