orm

package
v0.0.0-...-7daae65 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package orm provides `GORM` helpers for the creation, migration and access on the project's database

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseDbConnectionLogIfError

func CloseDbConnectionLogIfError(db *gorm.DB)

func CommitOrRollBackIfError

func CommitOrRollBackIfError(db *gorm.DB, err error)

func CommitOrRollBackIfErrorAndCloseSession

func CommitOrRollBackIfErrorAndCloseSession(db *gorm.DB, err error)

Types

type ORM

type ORM struct {
	DB *gorm.DB
}

ORM struct to holds the gorm pointer to db

func Factory

func Factory() (*ORM, error)

Factory creates a db connection with the selected dialect and connection string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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