Documentation
¶
Index ¶
- func Exists(dbPath string) (bool, error)
- type Engine
- func CheckEngine(dbPath string, createDatabaseIfNotExists bool, dbEngine ...Engine) (Engine, error)
- func EngineAllowed(dbEngine Engine, allowedEngines ...Engine) (Engine, error)
- func EngineFromString(engineStr string) (Engine, error)
- func EngineFromStringAllowed(dbEngineStr string, allowedEngines ...Engine) (Engine, error)
- func LoadEngineFromFile(path string) (Engine, error)
- func NewWithDefaultSettings(dbParams Params, createDatabaseIfNotExists bool, log *logger.Logger) (*gorm.DB, Engine, error)
- type Params
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Engine ¶
type Engine string
func CheckEngine ¶ added in v1.0.0
CheckEngine checks if the correct database engine is used. This function stores a so called "database info file" in the database folder or checks if an existing "database info file" contains the correct engine. Otherwise the files in the database folder are not compatible.
func EngineAllowed ¶ added in v1.0.0
EngineAllowed checks if the database engine is allowed.
func EngineFromString ¶ added in v1.0.0
EngineFromString parses an engine from a string. Returns an error if the engine is unknown.
func EngineFromStringAllowed ¶ added in v1.0.0
EngineFromStringAllowed parses an engine from a string and checks if the database engine is allowed.
func LoadEngineFromFile ¶ added in v1.0.0
LoadEngineFromFile returns the engine from the "database info file".
Click to show internal directories.
Click to hide internal directories.