db

package
v0.0.0-...-897acfa Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2022 License: Apache-2.0 Imports: 16 Imported by: 8

Documentation

Index

Constants

View Source
const (

	// DESC  降序
	DESC = "desc"

	// ASC  升序
	ASC = "asc"
)

Variables

This section is empty.

Functions

func FindPage

func FindPage(v interface{}, rows interface{}, pageInfo *page.PageInfo) (err error, pageBean *page.PageBean)

FindPage 分页查询 v-空对象指针

func Gorm

func Gorm() *gorm.DB

Gorm 初始化数据库并产生数据库全局变量 @return: *gorm.DB

func GormMySQL

func GormMySQL() *gorm.DB

GormMySQL 初始化Mysql数据库 @return: *gorm.DB

func GormPostgreSQL

func GormPostgreSQL() *gorm.DB

GormPostgreSQL 初始化PostgreSQL数据库 @return: *gorm.DB

func GormSQLite

func GormSQLite() *gorm.DB

GormSQLite 连接sqlite 数据库

func ResolveSortList

func ResolveSortList(sl []*Sort) string

ResolveSortList 解析 SortList

Types

type Sort

type Sort struct {

	/** 排序字段 */
	OrderKey string `json:"orderKey"`

	/** 排序方式 */
	Type string `json:"type"`
}

Jump to

Keyboard shortcuts

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