db

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: Apache-2.0 Imports: 13 Imported by: ? 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

Index

Constants

View Source
const (
	TagName              = "json"
	SearchWordColumnName = "search_word"
)

Variables

This section is empty.

Functions

func GetFieldName

func GetFieldName(field *structs.Field) string

Types

type Chain

type Chain struct {
	*gorm.DB
}

func GetChain

func GetChain(tx *gorm.DB) *Chain

func (*Chain) AddQueryOrderDir

func (c *Chain) AddQueryOrderDir(req Request, defaultColumn string) *Chain

func (*Chain) AddQueryOrderDirWithPrefix

func (c *Chain) AddQueryOrderDirWithPrefix(tableName string, req Request, defaultColumn string) *Chain

func (*Chain) BuildFilterConditions

func (c *Chain) BuildFilterConditions(req Request, tableName string, andOr string, exclude ...string) *Chain

func (*Chain) BuildFilterConditionsWithPrefix

func (c *Chain) BuildFilterConditionsWithPrefix(req Request, tableName string, andOr string, exclude ...string) *Chain

type MysqlConnPool

type MysqlConnPool struct {
}

* MysqlConnPool * use gorm

func GetInstance

func GetInstance() *MysqlConnPool

func (*MysqlConnPool) GetMysqlDB

func (m *MysqlConnPool) GetMysqlDB() *gorm.DB

func (*MysqlConnPool) InitDataPool

func (m *MysqlConnPool) InitDataPool() (isSucc bool)

* @fuc init connection

type Request

type Request interface {
	Reset()
	String() string
	ProtoMessage()
	Descriptor() ([]byte, []int)
}

type RequestWithReverse

type RequestWithReverse interface {
	RequestWithSortKey
	GetReverse() *wrappers.BoolValue
}

type RequestWithSortKey

type RequestWithSortKey interface {
	Request
	GetSortKey() *wrappers.StringValue
}

Jump to

Keyboard shortcuts

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