database

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2023 License: BSD-3-Clause Imports: 18 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 WithPostgreSQL

func WithPostgreSQL() plugins.Plugin

WithPostgreSQL launch PostgreSQL connection pool

func WithSQLite

func WithSQLite() plugins.Plugin

WithSQLite launch SQLite connection pool

Types

type ConfigMigrate

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

func (*ConfigMigrate) Default

func (v *ConfigMigrate) Default()

type ConfigMigrateItem

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 ConfigPgsql

type ConfigPgsql struct {
	Pool    []postgresql.Item   `yaml:"pgsql"`
	Migrate []ConfigMigrateItem `yaml:"pgsql_migrate"`
}

ConfigPgsql pgsql config model

func (*ConfigPgsql) Default

func (v *ConfigPgsql) Default()

func (*ConfigPgsql) List

func (v *ConfigPgsql) 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
}

MySQL connection MySQL interface

type PgSQL

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

PgSQL connection PostgreSql interface

type SQLite

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

SQLite connection SQLite interface

Jump to

Keyboard shortcuts

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