db

package
v0.0.1-alpha5 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	Strategy Strategy
}

DB holds our DB strategy

func (*DB) OpenDB

func (s *DB) OpenDB(config *ctx.Config) (*sqlx.DB, error)

OpenDB is the strategy method for OpenDB

type DriverSQL

type DriverSQL struct {
	Name string
}

DriverSQL holds our driver sql name struct (postgresql, mysql, etc)

func (DriverSQL) OpenDB

func (d DriverSQL) OpenDB(config *ctx.Config) (*sqlx.DB, error)

OpenDB open a Sql connexion

type Strategy

type Strategy interface {
	OpenDB(config *ctx.Config) (*sqlx.DB, error)
}

Strategy represents our strategy interface

Jump to

Keyboard shortcuts

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