Documentation ¶
Index ¶
- func Connect(connection string)
- func ExecuteTransaction(stmts ...Statement) error
- func GetDateString(i interface{}) string
- func GetDateTimeString(i interface{}) string
- func PrepareAndExecute(query string, args ...interface{}) error
- func PrepareAndQuery(query string, args ...interface{}) (*sql.Rows, error)
- func Query(stmt Statement) (*sql.Rows, error)
- func QueryRow(stmt Statement, data ...interface{}) error
- func SetInt(i interface{}, otherwise int) int
- func SetString(i interface{}, otherwise string) string
- type Statement
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Connect ¶
func Connect(connection string)
Connect takes in a valid psql connection string and opens the connection
func ExecuteTransaction ¶
ExecuteTransaction allows the user to execute >= 1 statement in a single sql transaction
func GetDateString ¶
func GetDateString(i interface{}) string
GetDateString returns a formatted date string
func GetDateTimeString ¶
func GetDateTimeString(i interface{}) string
GetDateTimeString returns a formatted date-time string
func PrepareAndExecute ¶
PrepareAndExecute performs the actions of Prepare and Execute a single statement in one step rather than forcing the user to manually Prepare a statement.
func PrepareAndQuery ¶
PrepareAndQuery performs the actions of Prepare and Query a single statement in one step rather than forcing the user to manually Prepare a statement.
func Query ¶
Query allows the user to perform a query where >= 1 rows are expected back It simply returns the rows so that the user may manipulate the data as they please
func QueryRow ¶
QueryRow allows the user to perform an sql query where only one row is expected The results of the query are put into the passed in data interfaces