sqlx

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoProvider = errors.New("ConnectionProvider was not provided")
View Source
var ErrUndefinedParam = errors.New("invalid param")

Functions

This section is empty.

Types

type ConnectionProvider

type ConnectionProvider = func(conf any) (*sqlx.DB, error)

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(params ...any) (*Service, error)

New creates new sqlx service params may be *sqlx.DB or ConnectionProvider;

in later case the next param (if any) will be used as conf argument in call to provider

func (*Service) DB

func (ss *Service) DB() (*sqlx.DB, error)

func (*Service) Prepare

func (ss *Service) Prepare(eng *vivard.Engine, prov dep.Provider) (err error)

func (*Service) Provide

func (ss *Service) Provide() interface{}

func (*Service) Reconnect

func (ss *Service) Reconnect(force bool) error

func (*Service) Start

func (ss *Service) Start(eng *vivard.Engine, prov dep.Provider) error

Jump to

Keyboard shortcuts

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