databases

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package databases provides capacity to interact with database

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustNewConnection

func MustNewConnection(dbConfig *config.Database) *gorm.DB

MustNewConnection just call NewConnection, but, when something goes wrong, it will raise a panic

func NewConnection

func NewConnection(dbConfig *config.Database) (*gorm.DB, error)

NewConnection will initialize a connection to database. But, if connection has already existed, it will be used.

Types

This section is empty.

Directories

Path Synopsis
Package migrate mainly provides capacity to migrateBak and rollback database change automatically.
Package migrate mainly provides capacity to migrateBak and rollback database change automatically.
migrations
Package migrations hold the migration file for operate database
Package migrations hold the migration file for operate database
Package models map program entity to database table
Package models map program entity to database table

Jump to

Keyboard shortcuts

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