ormdb

package
v0.0.0-...-7491e2d Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteORMDatabase

func DeleteORMDatabase(ormDatabase *ORMDatabase) error

DeleteORMDatabase deletes a ORM database object, as well as the underlying database if it exists

func ToTableName

func ToTableName(entityName string) string

Types

type ORMDBInstance

type ORMDBInstance struct {
	Config *config.ORMDBConfig
}

ORMDBInstance represents a ORMDB instance

func NewORMDBInstance

func NewORMDBInstance(config *config.ORMDBConfig, metricsProvider metrics.Provider) (*ORMDBInstance, error)

NewORMDBInstance create a ORMDB instance through ORMDBConfig

type ORMDatabase

type ORMDatabase struct {
	ORMDBInstance *ORMDBInstance
	DBName        string
	DB            *gorm.DB
	Type          string
	RWMutex       sync.RWMutex
	ModelTypes    map[string]entitydefinition.DynamicStruct
}

ORMDatabase represents a database within a ORMDB instance

func CreateORMDatabase

func CreateORMDatabase(ormDBInstance *ORMDBInstance, dbName string) (*ORMDatabase, error)

CreateORMDatabase creates a ORM database object, as well as the underlying database if it does not exist

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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