database

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Index

Constants

This section is empty.

Variables

View Source
var (
	Db     *gorm.DB
	Config = config.Database
)

Functions

func Connect added in v0.2.1

func Connect()

func DeleteRowByTable

func DeleteRowByTable(tableName string, field string, value interface{})

WANING: 该操作会删除数据,并且不可恢复 通常只用于测试中

func Dispose added in v0.2.1

func Dispose()

func Migrate added in v0.4.0

func Migrate(db *gorm.DB) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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