db

package
v0.0.0-...-6a020d3 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBConnection

func DBConnection() *gorm.DB

DBConnection fetches the gorm DB from anywhere, regardless of which database is being used

Types

type DatabaseConnection

type DatabaseConnection interface {
	DatabaseInit()
	DatabaseMigrator()
}

DatabaseConnection is done for ease of changing DB. This works with MariaDB and SQL Server. This can however be extended manually, with any of the databases supported by Gorm (see https://gorm.io/docs/connecting_to_the_database.html)

func DatabaseConnectionFactory

func DatabaseConnectionFactory() DatabaseConnection

DatabaseConnectionFactory returns a database that implements the DatabaseConnection interface from the RDBMS written in the "DB_TYPE" env

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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