sqlutil

package
v0.0.0-...-b76d47b Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(execer Execer, noAffectedRows error, query string, args ...interface{}) error

func UnaryRelationQuery

func UnaryRelationQuery(queryer Queryer, query string, count int) ([]string, error)

Types

type Execer

type Execer interface {
	Exec(query string, args ...interface{}) (sql.Result, error)
}

type Queryer

type Queryer interface {
	Query(query string, args ...interface{}) (*sql.Rows, error)
}

type SQLDatabase

type SQLDatabase interface {
	Execer
	Queryer
	QueryRow(query string, args ...interface{}) *sql.Row
}

type SQLTxDatabase

type SQLTxDatabase interface {
	SQLDatabase
	InTx(fn func(tx *sql.Tx) error) error
}

Jump to

Keyboard shortcuts

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