db

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachMigrationFunc

func AttachMigrationFunc(instanceName string, f func(migrator gorm.Migrator) error) error

AttachMigrationFunc - attach migration function to be called by end user

func GetDb

func GetDb(instanceName string) (*gorm.DB, error)

GetDb - Get *gorm.DB instance from the underlying interfaces

func GetMongoDb

func GetMongoDb(instanceName string) (*mongo.Database, error)

GetMongoDb - Get *mongo.Client instance from the underlying interfaces

func Migrate

func Migrate(instanceName string, models ...interface{}) error

Migrate - migrate models on specific database

func SetupManager

func SetupManager()

SetupManager - Setup manager

Types

type InsertModelError added in v0.0.24

type InsertModelError = db.InsertModelErr

type MongoDeleteErr added in v0.0.24

type MongoDeleteErr = db.MongoDeleteErr

type MongoFindQueryErr added in v0.0.24

type MongoFindQueryErr = db.MongoFindQueryErr

type UpdateModelError added in v0.0.24

type UpdateModelError = db.UpdateModelErr

Jump to

Keyboard shortcuts

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