database

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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