database

package
v0.9.4-rc2 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SqlUniqueConstraintError    string = "Unique constraint violation."                //nolint:gochecknoglobals
	SqlExecutionError           string = "Executing SQL statement."                    //nolint:gochecknoglobals
	SqlAffectedRowsCheckError   string = "Checking the affected rows."                 //nolint:gochecknoglobals
	SqlBeginTransactionError    string = "Starting SQL transaction."                   //nolint:gochecknoglobals
	SqlRollbackTransactionError string = "Rollback SQL transaction."                   //nolint:gochecknoglobals
	SqlCommitTransactionError   string = "Committing SQL transaction."                 //nolint:gochecknoglobals
	SqlScanResulSetError        string = "Reading the results from the SQL statement." //nolint:gochecknoglobals
)

Functions

func MigrateUp

func MigrateUp(db *sqlx.DB) error

MigrateUp migrates up to the latest migration version. It should be used when the version number changes.

func PgConnect

func PgConnect(dbName, user, password, host, port string) (db *sqlx.DB, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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