dbconfig

package
v7.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: ISC Imports: 5 Imported by: 0 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package dbconfig defines the parameters and methods for the PostgreSQL tests.

Index

Constants

View Source
const (
	PGTestsHost   = "localhost" // "/run/postgresql" for UNIX socket
	PGTestsPort   = "5432"      // "" for UNIX socket
	PGTestsUser   = "postgres"  // "dcrdata" for full database rather than test data repo
	PGTestsPass   = ""
	PGTestsDBName = "dcrdata_mainnet_test"
)

Test DB server and database config.

Variables

This section is empty.

Functions

func CustomScanner

func CustomScanner(m Migrations) error

CustomScanner enables a given *.sql file dump to be scanned and loaded into the respective query runner using the Runner method.

Types

type Migrations

type Migrations interface {
	// Path returns the filepath to the *.sql dump file.
	Path() string
	// Runner executes the scanned individual queries one after another.
	Runner(query string) error
}

Migrations enables a custom migration runner to be used to load data from a given *.sql file dump into the migrations runner method.

Jump to

Keyboard shortcuts

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