database

package
v0.0.0-...-f9022d8 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2014 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear

func Clear(driver, path string) error

Clears any cached open/close errors. Returns an error if the database is currently open.

func Close

func Close(db *sql.DB) error

Closes the specified database (if this is the last reference to it). If a previous Close returned an error, subsequent Closes will continue to return the error until either Open() or Clear() is called.

func Open

func Open(driver, path string) (*sql.DB, error)

Returns the specified database, opening it if necessary. If opening the database fails, this function will return an error, and will not re-try opening the database unless you Clear() it.

The returned database is ref-counted; you must call Close() with the same driver/path combo to balance every successful Open(). You should not call Close() if the Open() failed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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