sqlh

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Postgres = "postgres"
	MySql    = "mysql"
	Mock     = "mock"
)

Variables

This section is empty.

Functions

func NewMock

func NewMock(dsn string) (*sql.DB, *mock)

func Open

func Open(c Config) (*sql.DB, error)

Types

type Config

type Config struct {
	Dialect  string
	Host     string
	Port     int
	DbName   string
	Username string
	Password string
}

func Default

func Default(dialect string) Config

func (Config) DNS

func (c Config) DNS() string

type DB

type DB struct {
	*sql.DB
}

Jump to

Keyboard shortcuts

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