connection

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2019 License: Apache-2.0 Imports: 10 Imported by: 5

README

connection

Build Status Go Report Card GoDoc License PRs Welcome

connection

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseConnection

type DatabaseConnection interface {
	CreateLog(logType int, text string, logError string, jobHistoryID string, createTime time.Time) (id int, affectedRows int, err error)
	Execute(sql string, args ...interface{}) (result sql.Result, err error)
	Exec(procedure *Procedure)
	Read(procedure *Procedure)
	Migrate(path string) (err error)
}

DatabaseConnection defines the methods that are required to fulfil the needs of the application for interacting with a database

func NewConnection

func NewConnection(config dbConfig) (DatabaseConnection, error)

NewConnection returns a connection to the sql database

type Procedure

type Procedure struct {
	Proc       string
	Parameters []interface{}
	Callback   func(results interface{}, dberr error)
}

Procedure holds the information required for call a stored procedure

Jump to

Keyboard shortcuts

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