database

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(db *gorm.DB)

Close closes an open database connection

func CloseRows

func CloseRows(rows *sql.Rows)

CloseRows closes a sql.Rows object and logs any errors that occurred

func Get

func Get() *gorm.DB

Get returns the singleton database connection

func Open

func Open(fileName string) (*gorm.DB, error)

Open opens a new database connection to the specified SQLite database file

func Set

func Set(db *gorm.DB)

Set sets the singleton database connection

Types

This section is empty.

Jump to

Keyboard shortcuts

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