plpgsql

package module
v0.0.0-...-aa33b68 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2014 License: BSD-3-Clause Imports: 4 Imported by: 0

README

plpgsql

Golang utilities for calling PL/pgSQL functions.

Documentation

Overview

Package plpgsql provides some utilities for running PL/pgSQL functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecFn

func ExecFn(db *sql.DB, fn string, args []interface{}, dests ...interface{}) error

ExecFn runs a PL/pgSQL function.

func Int64

func Int64(db *sql.DB, fn string, args ...interface{}) (int64, error)

Int64 executes a PL/pgSQL function returning an int64.

func MustOpen

func MustOpen(conn string) *sql.DB

MustOpen returns a connection to a postgres database or panics.

func Open

func Open(conn string) (*sql.DB, error)

Open returns a connection to a postgres database.

func QueryRow

func QueryRow(db *sql.DB, fn string, args ...interface{}) (*sql.Rows, error)

QueryRow is similar to sql.QueryRow but ignores sql.ErrNoRows and returns errors raised within a PL/pgSQL function.

func ScanRow

func ScanRow(rows *sql.Rows, dests ...interface{}) error

ScanRow scans the return values of a PL/pgSQL function into the provided destination arguments.

func String

func String(db *sql.DB, fn string, args ...interface{}) (string, error)

String executes a PL/pgSQL function returning a string.

func Void

func Void(db *sql.DB, fn string, args ...interface{}) error

Void executes a PL/pgSQL function returning nothing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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