drivers

package
v0.0.0-...-192d3ef Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DriverMap = map[DriverType]DriverGenerator{}

Functions

func NewBackendService

func NewBackendService(ds DriverService) backends.Interface

func RegisterDriver

func RegisterDriver(generator DriverGenerator, driverType DriverType)

Types

type DriverGenerator

type DriverGenerator func(config *backends.BackendConfig) DriverService

type DriverService

type DriverService interface {
	Open() (*sql.DB, error)
	SchemaExists() (bool, error)
	CreateSchema() error
	DropSchema() error
	DumpSchema(db *sql.DB) ([]byte, error)
	CreateMigrationsTable(db *sql.DB) error
	SelectMigrations(db *sql.DB, id int) (map[string]bool, error)
	InsertMigration(tx backends.Transaction, version string) error
	DeleteMigration(tx backends.Transaction, version string) error
	Ping() error
}

type DriverType

type DriverType string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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