db

package
v0.0.0-...-9f32554 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// PSQLErrUniqueConstraint holds the error code that denotes a unique constraint is
	// attempting to be violated.
	PSQLErrUniqueConstraint = "23505"
)

Functions

func NewConnection

func NewConnection(cfg Config) (*sqlx.DB, error)

NewConnection returns a new database connection with the schema applied, if not already applied.

Types

type Config

type Config struct {
	User string
	Pass string
	Name string
	Host string
	Port int
}

Jump to

Keyboard shortcuts

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