database

package
v0.32.12 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DialectExecutor

type DialectExecutor interface {
	// Identifier returns a unique identifier for the database if possible, or "", false
	Identifier(context.Context) (string, bool)
	// Validate is called before startup to check that the dialect can execute properly. If returns true and error is set, the error is merely logged.
	Validate(context.Context) (bool, error)
	// Info returns basic information about the database such as version, uptime, etc'
	Info(context.Context) (model.DatabaseInfo, error)
}

func GetExecutor

func GetExecutor(dsn string) (schema.DialectType, DialectExecutor, error)

type SimpleStorage

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

func NewStorage

func NewStorage(dsn string, dialect DialectExecutor) *SimpleStorage

func (SimpleStorage) DSN

func (s SimpleStorage) DSN() string

func (SimpleStorage) DialectExecutor

func (s SimpleStorage) DialectExecutor() DialectExecutor

type Storage

type Storage interface {
	DSN() string
	DialectExecutor() DialectExecutor
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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