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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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