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: 4

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