db

package
v0.0.0-...-7ee6393 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateRow

func UpdateRow(db *sqlx.DB, query string, args ...interface{}) (err error)

UpdateRow wraps db.Exec and ensures that exactly one row was affected

Types

type DBConfig

type DBConfig struct {
	DriverName string
	DSN        string
}

type DatabaseConnection

type DatabaseConnection struct {
	DB *sqlx.DB
	DBConfig
}

func ConnectToDB

func ConnectToDB(log *zerolog.Logger, dbConfig DBConfig) *DatabaseConnection

Jump to

Keyboard shortcuts

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