temp

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn struct {
	*pgx.Conn
	SchemaName string
}

func Connect

func Connect(database string) (*Conn, error)

Connect establishes a new pg connection to the provided database name, creates a new random schema and sets the search path to that schema. When you close the connection, the schema is dropped, making the schema ephemeral.

func (*Conn) Close

func (tmp *Conn) Close() error

Close drops the associated schema and then closes the connection.

Jump to

Keyboard shortcuts

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