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
}
Click to show internal directories.
Click to hide internal directories.