baseDAL

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrStmtNotFound will be returned is statement for request was not found in registry
	ErrStmtNotFound = errors.New("statement with such name was not found in statementRegistry")
	// ErrStmtNotInitialized will be returned is statement for request was not initialized
	ErrStmtNotInitialized = errors.New("statement was not initialized")
)

Functions

This section is empty.

Types

type DAL

type DAL struct {
	DB                 *sqlx.DB
	PreparedStatements map[string]*sqlx.Stmt
	Logger             logrus.FieldLogger
	Ctx                context.Context
}

DAL is struct with common dependencies for DAL implementations

func (DAL) PreparedStatement

func (d DAL) PreparedStatement(name string) (*sqlx.Stmt, error)

PreparedStatement returns initialized statement or one of errors: ErrStmtNotFound, ErrStmtNotInitialized

Jump to

Keyboard shortcuts

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