rdb

package
v1.0.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2019 License: ISC Imports: 5 Imported by: 1

Documentation

Overview

The rdb package provides a basic bootstrap connection to a relational (SQL) database for Liquid Dev projects.

rdb supports logging queries to stderr. This can activated via `LogQueries` called from a test file or by setting the 'DEBUG_SQL' environment variable. A value of 'before' will log the query prior to processing DEFAULTs. 'all' will show both prior and post-DEFAULT processing, and any other non-blank value will show post-processing values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect() *pg.DB

Connect initializes the DB connection. The following environment variables must be defined: * CLOUDSQL_CONNECTION_NAME * CLOUDSQL_DB * CLOUDSQL_PASSWORD * CLOUDSQL_USER

func ConnectWithContext

func ConnectWithContext(ctx context.Context) *pg.DB

func EchoQueries

func EchoQueries(opt string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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