database

package
v0.0.0-...-64303aa Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2025 License: GPL-3.0, GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func CheckDBForErrorOrNoRows

func CheckDBForErrorOrNoRows(db *gorm.DB) (*gorm.DB, bool)

TODO: make this function usefull still need to do 2 checks most of the time where this function is called

func CreateDatabase

func CreateDatabase() (*gorm.DB, error)

func CreateDatabaseWithDSN

func CreateDatabaseWithDSN(connectionString string) (*gorm.DB, error)

func MigrateDatabase

func MigrateDatabase(db *gorm.DB)

func MigrateWithLog

func MigrateWithLog(name string, i interface{}, db *gorm.DB)

migrates using GORM framework instead of migration files, not used atm

func RunMigrations

func RunMigrations(db *gorm.DB) error

runs the migration files in the /migrations folder

Types

This section is empty.

Jump to

Keyboard shortcuts

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