conn

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MySQL

func MySQL(host, port, username, password, database string, silent ...bool) (*gorm.DB, error)

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 Sqlite

func Sqlite(path string, silent ...bool) (*gorm.DB, error)

Sqlite connects to a SQLite 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 SqliteMem

func SqliteMem(silent ...bool) (*gorm.DB, error)

SqliteMem connects to a SQLite database in memory 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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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