csql

package
v0.0.0-...-0b08f29 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoRows = sql.ErrNoRows

ErrNoRows is returned by Scan when QueryRow doesn't return a row. In such a case, QueryRow returns a placeholder *Row value that defers this error until a Scan.

Functions

This section is empty.

Types

type DB

type DB struct {
	*sql.DB
	Schema string
}

DB encapsulates a standard sql.DB with a schema

func OpenWithSchema

func OpenWithSchema(dataSourceName, dataSourcePassword, schema string) *DB

OpenWithSchema opens a kurbisio postgres database with a schema. The schema gets created if it does not exist yet. The returned database also has the uuid-ossp extension loaded.

func (*DB) ClearSchema

func (db *DB) ClearSchema()

ClearSchema clears all the data contained in the database's schema Technically this is done by dropping the schema and then recreating it

Jump to

Keyboard shortcuts

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