myquery

package
v0.0.0-...-5436d54 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2019 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(host string, user string, password string, port string, db string) (*sql.DB, error)

Establish a database connection, immediately connecting to the database

func Fetch

func Fetch(rows *sql.Rows) (map[string]string, error)
 This function is generic in that it returns all column values as a
   map of column names to  string values.  NULL values are represented
	 by string :NULL: (this is unlikely to appear in real data)

	 This function is less useful if you need to do calculations on
	 numeric values.  It makes more sense to fetch a SQL resultset
	 into a struct in that case.

func Query

func Query(db *sql.DB, sql string) (*sql.Rows, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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