query

package
v0.0.0-...-8dc4a41 Latest Latest
Warning

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

Go to latest
Published: May 25, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package query implements helpers around database/sql to execute various kinds of very common SQL queries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SelectIntegers

func SelectIntegers(tx *sql.Tx, query string) ([]int, error)

SelectIntegers executes a statement which must yield rows with a single integer column. It returns the list of column values.

func SelectStrings

func SelectStrings(tx *sql.Tx, query string) ([]string, error)

SelectStrings executes a statement which must yield rows with a single string column. It returns the list of column values.

func Transaction

func Transaction(db *sql.DB, f func(*sql.Tx) error) error

Transaction executes the given function within a database transaction.

Types

This section is empty.

Jump to

Keyboard shortcuts

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