sqlxdb

package
v0.0.0-...-f70f7d2 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(c Config) (*sqlx.DB, error)

Connect connects for the database

func IsDatabaseError

func IsDatabaseError(err error) bool

IsDatabaseError verifies if error is an DataBaseError

func NewDatabaseError

func NewDatabaseError(err error) error

NewDatabaseError creates a new DataBaseError instance

Types

type Config

type Config struct {
	Driver string
	DSN    string

	MaxOpenConns int
	MaxIdleConns int
}

Config represents the database config

func NewConfig

func NewConfig(dr string, dt string) Config

NewConfig creates an instance of Config

type DatabaseError

type DatabaseError struct {
	errors.BaseError
}

DatabaseError error type for database error

Jump to

Keyboard shortcuts

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