tools

package
v0.0.0-...-4714720 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2015 License: Apache-2.0, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAX_RETRIES = 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PostgresDB

type PostgresDB interface {
	// makes query to database
	// returns result as a mapping of strings to string arrays
	// where key is column name and value is the items stored in column
	// in same order as rows
	QueryReturnColumnDict(query string) (map[string][]string, error)

	// makes query to database
	// returns result as a mapping of strings to string arrays
	// where key is the value stored in the first column of a row
	// and is mapped to the remaining values in the row
	// in the order as they appeared in the row
	QueryMapFirstColumnToRow(query string) (map[string][]string, error)

	// Log Prints in to the logger
	Log(in interface{})

	// Closes the connection with the database
	Close()
}

func New

func New(dsn map[string]string) (PostgresDB, error)

New creates connection to postgres database

Jump to

Keyboard shortcuts

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