Documentation
¶
Index ¶
- Variables
- func MySQL(host, port, username, password, database string, silent ...bool) (*gorm.DB, error)
- func PostgreSQL(host, port, username, password, database string, silent ...bool) (*gorm.DB, error)
- func QuickMySQL(silent ...bool) (*gorm.DB, error)
- func QuickPostgreSQL(silent ...bool) (*gorm.DB, error)
- func Sqlite(path string, silent ...bool) (*gorm.DB, error)
- func SqliteMem(silent ...bool) (*gorm.DB, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func MySQL ¶
MySQL connects to a MySQL database and returns a gorm.DB object. By default, the silent parameter is false, which means that the gorm.DB object will log all SQL statements to the console.
func PostgreSQL ¶
PostgreSQL connects to a MySQL database and returns a gorm.DB object. By default, the silent parameter is false, which means that the gorm.DB object will log all SQL statements to the console.
func QuickMySQL ¶
QuickMySQL connects to a MySQL database using the environment variables.
func QuickPostgreSQL ¶
QuickPostgreSQL connects to a MySQL database using the environment variables.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.