mysql

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open added in v0.0.4

func Open(mysqlConfig mysql.Config, config *gorm.Config) (*gorm.DB, error)

func OpenDSN added in v0.0.4

func OpenDSN(dsn string) (*gorm.DB, error)

OpenDSN

Types

type Config

type Config struct {
	Name                          string
	DSN                           string
	SkipInitializeWithVersion     bool
	DefaultStringSize             uint
	DefaultDatetimePrecision      *int
	DisableWithReturning          bool
	DisableDatetimePrecision      bool
	DontSupportRenameIndex        bool
	DontSupportRenameColumn       bool
	DontSupportForShareClause     bool
	DontSupportNullAsDefaultValue bool
	DontSupportRenameColumnUnique bool
	Config                        *gorms.GORMConfig
}

func (*Config) DB

func (c *Config) DB() (*gorm.DB, error)

func (*Config) GetName

func (c *Config) GetName() string

type NameDBConfig added in v0.0.3

type NameDBConfig struct {
	User                          string
	Password                      string
	Host                          string
	Port                          int
	Charset                       string
	NameDatabase                  map[string]string
	SkipInitializeWithVersion     bool
	DefaultStringSize             uint
	DefaultDatetimePrecision      *int
	DisableWithReturning          bool
	DisableDatetimePrecision      bool
	DontSupportRenameIndex        bool
	DontSupportRenameColumn       bool
	DontSupportForShareClause     bool
	DontSupportNullAsDefaultValue bool
	DontSupportRenameColumnUnique bool
	Config                        *gorms.GORMConfig
}

func (*NameDBConfig) NameDB added in v0.0.3

func (c *NameDBConfig) NameDB() (map[string]*gorm.DB, error)

Jump to

Keyboard shortcuts

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