database

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithMySQL

func WithMySQL() plugins.Plugin

WithMySQL launch MySQL connection pool

func WithSQLite

func WithSQLite() plugins.Plugin

WithSQLite launch SQLite connection pool

Types

type ConfigMigrate added in v0.11.0

type ConfigMigrate struct {
	List []ConfigMigrateItem `yaml:"db_migrate"`
}

func (*ConfigMigrate) Default added in v0.11.0

func (v *ConfigMigrate) Default()

type ConfigMigrateItem added in v0.11.0

type ConfigMigrateItem struct {
	Pool string `yaml:"pool"`
	Dir  string `yaml:"dir"`
}

type ConfigMysql

type ConfigMysql struct {
	Pool    []mysql.Item        `yaml:"mysql"`
	Migrate []ConfigMigrateItem `yaml:"mysql_migrate"`
}

ConfigMysql mysql config model

func (*ConfigMysql) Default

func (v *ConfigMysql) Default()

func (*ConfigMysql) List

func (v *ConfigMysql) List() (list []schema.ItemInterface)

List getting all configs

type ConfigSqlite

type ConfigSqlite struct {
	Pool    []sqlite.Item       `yaml:"sqlite"`
	Migrate []ConfigMigrateItem `yaml:"sqlite_migrate"`
}

ConfigSqlite sqlite config model

func (*ConfigSqlite) Default

func (v *ConfigSqlite) Default()

func (*ConfigSqlite) List

func (v *ConfigSqlite) List() (list []schema.ItemInterface)

List getting all configs

type MySQL

type MySQL interface {
	Pool(name string) orm.Stmt
	Dialect() string
}

MySQL connection MySQL interface

type SQLite

type SQLite interface {
	Pool(name string) orm.Stmt
	Dialect() string
}

SQLite connection SQLite interface

Jump to

Keyboard shortcuts

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