database

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2020 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

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

Index

Constants

View Source
const SqlDbVersionTableCreate = "" /* 211-byte string literal not displayed */

tables

Variables

This section is empty.

Functions

func ConnectInitializedDatabase

func ConnectInitializedDatabase(postgresDbConfig *postgresdb.Config, upgradeScripts []*UpgradeScript) (*sql.DB, error)

ConnectInitializedDatabase creates a database with the required metadata tables

func QueryDbVersion

func QueryDbVersion(db *sql.DB) (uint32, error)
query helper functions

QueryDbVersion queries for the version of the database

Types

type UpgradeScript

type UpgradeScript struct {
	// contains filtered or unexported fields
}

UpgradeScript encapsulates a script to be run to upgrade the database from one version to the next

func MakeUpgradeScript

func MakeUpgradeScript(version uint32, command string, moreCommands ...string) *UpgradeScript

MakeUpgradeScript encapsulates a script to be run to upgrade the database from one version to the next

Jump to

Keyboard shortcuts

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