package
0.0.0-20230203010516-6d4bf48beedd
Repository: https://github.com/onyx-protocol/onyx.git
Documentation: pkg.go.dev
# Functions
CloneDB creates a new database, using the database at the provided URL as a template.
Dump performs a full pg_dump of the data in the database at the provided URL.
Exec executes q in the database or transaction in ctx.
NewDB creates a database initialized with the schema in schemaPath.
NewTx returns a new transaction on a database initialized with the schema in SchemaPath.
WrapDB opens a new connection to the database at the provided URL, but with a driver that calls wrapFn on every driver.Stmt.Exec call and driver.Stmt.Query call.
# Constants
DefaultURL is used by NewTX and NewDB if DBURL is the empty string.
# Variables
DBURL should be a URL of the form "postgres://...".
SchemaPath is a file containing a schema to initialize a database in NewTx.
# Interfaces
Fataler lets NewTx and NewDB signal immediate failure.