db

package
v0.0.0-...-58a198e Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cell

func Cell(
	ctx context.Context, dest interface{}, query string, args ...interface{},
) error

Cell runs a query which should return one value.

func CellString

func CellString(
	ctx context.Context, query string, args ...interface{},
) (string, error)

CellString returns a string.

func DB

func DB() *sqlx.DB

func Execute

func Execute(
	ctx context.Context, query string, args ...interface{},
) (sql.Result, error)

Execute rusn a query which do not return values.

func MustCellString

func MustCellString(
	ctx context.Context, query string, args ...interface{},
) string

MustCellString returns a string.

func Row

func Row(
	ctx context.Context, dest interface{}, query string, args ...interface{},
) error

Row runs a query which should return one row.

func Select

func Select(
	ctx context.Context, dest interface{}, query string, args ...interface{},
) error

Select runs a query which may return multiple rows.

Types

This section is empty.

Jump to

Keyboard shortcuts

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