postgres

package
v0.0.0-...-57806cc Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(db *sql.DB)

Close the database connection using by calling this function

func CloseQuery

func CloseQuery(rows *sql.Rows)

CloseQuery closes the query connection

func Connect

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

Connect completes a connection to a PostgreSQL database host

func PrintRows

func PrintRows(w http.ResponseWriter, rows *sql.Rows) error

PrintRows prints out the returned rows provided to the function

func Query

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

Query runs a transactional statement on a PostgreSQL database

Types

This section is empty.

Jump to

Keyboard shortcuts

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