gplus

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package gplus is wrap for gorm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func As

func As(columnName any, asName any) string

func Begin

func Begin(opts ...*sql.TxOptions) *gorm.DB

Begin 起一个事务

func Cache

func Cache(models ...any)

Cache 缓存实体对象所有的字段名

func Delete

func Delete[T any](q *QueryCond[T], opts ...OptionFunc) *gorm.DB

Delete 根据条件删除记录

func DeleteById

func DeleteById[T any](id any, opts ...OptionFunc) *gorm.DB

DeleteById 根据 ID 删除记录

func DeleteByIds

func DeleteByIds[T any](ids any, opts ...OptionFunc) *gorm.DB

DeleteByIds 根据 ID 批量删除记录

func ExcSQL added in v0.0.6

func ExcSQL(querySQL string, opts ...OptionFunc) *gorm.DB

ExcSQL 按任意SQL执行,返回影响的行

func Exists

func Exists[T any](q *QueryCond[T], opts ...OptionFunc) (bool, error)

Exists 根据条件判断记录是否存在

func GetModel

func GetModel[T any]() *T

GetModel 获取

func Init

func Init(db *gorm.DB)

Init 初始化DB

func Insert

func Insert[T any](entity *T, opts ...OptionFunc) *gorm.DB

Insert 插入一条记录

func InsertBatch

func InsertBatch[T any](entities []*T, opts ...OptionFunc) *gorm.DB

InsertBatch 批量插入多条记录

func InsertBatchSize

func InsertBatchSize[T any](entities []*T, batchSize int, opts ...OptionFunc) *gorm.DB

InsertBatchSize 批量插入多条记录

func LikeLeft added in v0.0.3

func LikeLeft(query *QueryCond[any], name string, value any)

LikeLeft 左模糊 LIKE '%值'

func LikeRight added in v0.0.3

func LikeRight(query *QueryCond[any], name string, value any)

LikeRight 右模糊 LIKE '值%'

func Pluck

func Pluck[T any, R any](column string, q *QueryCond[T], opts ...OptionFunc) ([]R, *gorm.DB)

Pluck 取某列值,不去重

func PluckDistinct

func PluckDistinct[T any, R any](column string, q *QueryCond[T], opts ...OptionFunc) ([]R, *gorm.DB)

PluckDistinct 取某列值,去重

func SelectById

func SelectById[T any](id any, opts ...OptionFunc) (*T, *gorm.DB)

SelectById 根据 ID 查询单条记录

func SelectByIdGeneric

func SelectByIdGeneric[T any, R any](id any, opts ...OptionFunc) (*R, *gorm.DB)

SelectByIdGeneric 查询时,转化为其他类型 第一个泛型代表数据库表实体 第二个泛型代表返回记录实体

func SelectByIds

func SelectByIds[T any](ids any, opts ...OptionFunc) ([]*T, *gorm.DB)

SelectByIds 根据 ID 查询多条记录

func SelectCount

func SelectCount[T any](q *QueryCond[T], opts ...OptionFunc) (int64, *gorm.DB)

SelectCount 根据条件查询记录数量

func SelectGeneric

func SelectGeneric[T any, R any](q *QueryCond[T], opts ...OptionFunc) (R, *gorm.DB)

SelectGeneric 根据传入的泛型封装记录 第一个泛型代表数据库表实体 第二个泛型代表返回记录实体

func SelectList

func SelectList[T any](q *QueryCond[T], opts ...OptionFunc) ([]*T, *gorm.DB)

SelectList 根据条件查询多条记录

func SelectListBySQL added in v0.0.6

func SelectListBySQL[R any](querySQL string, opts ...OptionFunc) ([]*R, *gorm.DB)

SelectListBySQL 按任意SQL执行,指定返回类型数组

func SelectListGeneric

func SelectListGeneric[T any, R any](q *QueryCond[T], opts ...OptionFunc) ([]*R, *gorm.DB)

SelectListGeneric 根据条件查询多条记录 第一个泛型代表数据库表实体 第二个泛型代表返回记录实体

func SelectOne

func SelectOne[T any](q *QueryCond[T], opts ...OptionFunc) (*T, *gorm.DB)

SelectOne 根据条件查询单条记录

func SelectOneBySQL added in v0.0.6

func SelectOneBySQL[R any](countSQL string, opts ...OptionFunc) (R, *gorm.DB)

SelectOneBySQL 根据原始的SQL语句,取一个

func Tx added in v0.0.3

func Tx(txFunc func(tx *gorm.DB) error, opts ...OptionFunc) error

Tx 事务

func Update

func Update[T any](q *QueryCond[T], opts ...OptionFunc) *gorm.DB

Update 根据 Map 更新

func UpdateById

func UpdateById[T any](entity *T, opts ...OptionFunc) *gorm.DB

UpdateById 根据 ID 更新,默认零值不更新

func UpdateZeroById

func UpdateZeroById[T any](entity *T, opts ...OptionFunc) *gorm.DB

UpdateZeroById 根据 ID 零值更新

Types

type Comparable added in v0.0.4

type Comparable interface {
	~int | ~int8 | ~int16 | ~int32 | ~int64 | ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~float32 | ~float64 | time.Time
}

Comparable 可比较的接口

type Condition added in v0.0.3

type Condition struct {
	Group       string
	ColumnName  string
	Op          string
	ColumnValue any
}

Condition 条件结构体

type Dao

type Dao[T any] struct{}

Dao 通用dao层

func (Dao[T]) NewQuery

func (dao Dao[T]) NewQuery() (*QueryCond[T], *T)

NewQuery 构造一个查询

type Function

type Function struct {
	// contains filtered or unexported fields
}

func Avg

func Avg(columnName any) *Function

func Count

func Count(columnName any) *Function

func Max

func Max(columnName any) *Function

func Min

func Min(columnName any) *Function

func Sum

func Sum(columnName any) *Function

func (*Function) As

func (f *Function) As(asName any) string

func (*Function) Between

func (f *Function) Between(start int64, end int64) (string, int64, int64)

func (*Function) Eq

func (f *Function) Eq(value int64) (string, int64)

func (*Function) Ge

func (f *Function) Ge(value int64) (string, int64)

func (*Function) Gt

func (f *Function) Gt(value int64) (string, int64)

func (*Function) In

func (f *Function) In(values ...any) (string, []any)

func (*Function) Le

func (f *Function) Le(value int64) (string, int64)

func (*Function) Lt

func (f *Function) Lt(value int64) (string, int64)

func (*Function) Ne

func (f *Function) Ne(value int64) (string, int64)

func (*Function) NotBetween

func (f *Function) NotBetween(start int64, end int64) (string, int64, int64)

func (*Function) NotIn

func (f *Function) NotIn(values ...any) (string, []any)

type Option

type Option struct {
	Db          *gorm.DB
	Selects     []any
	Omits       []any
	IgnoreTotal bool
}

Option 是作为查询时单独传入参数的对象

type OptionFunc

type OptionFunc func(*Option)

OptionFunc 是 option指令的函数

func Db

func Db(db *gorm.DB) OptionFunc

Db 使用传入的Db对象

func IgnoreTotal

func IgnoreTotal() OptionFunc

IgnoreTotal 分页查询忽略总数 issue: https://github.com/aixj1984/gorm-plus/issues/37

func Omit

func Omit(columns ...any) OptionFunc

Omit 指定需要忽略的字段

func Select

func Select(columns ...any) OptionFunc

Select 指定需要查询的字段

func Session

func Session(session *gorm.Session) OptionFunc

Session 创建回话

type Page

type Page[T any] struct {
	Current    int   `json:"page"`     // 页码
	Size       int   `json:"pageSize"` // 每页大小
	Total      int64 `json:"total"`
	Records    []*T  `json:"list"`
	CurTime    int64 `json:"curTime"` // 当前时间,毫秒
	RecordsMap []T   `json:"listMap"`
}

Page 分页查询结构

func NewPage

func NewPage[T any](current, size int) *Page[T]

NewPage 构造一个分页查询

func SelectPage

func SelectPage[T any](page *Page[T], q *QueryCond[T], opts ...OptionFunc) (*Page[T], *gorm.DB)

SelectPage 根据条件分页查询记录

func SelectPageGeneric

func SelectPageGeneric[T any, R any](page *Page[R], q *QueryCond[T], opts ...OptionFunc) (*Page[R], *gorm.DB)

SelectPageGeneric 根据传入的泛型封装分页记录 第一个泛型代表数据库表实体 第二个泛型代表返回记录实体

type QueryCond

type QueryCond[T any] struct {
	// contains filtered or unexported fields
}

func BuildQuery added in v0.0.3

func BuildQuery[T any](queryParams url.Values) *QueryCond[T]

BuildQuery 编译查询

func NewQuery

func NewQuery[T any]() (*QueryCond[T], *T)

NewQuery 构建查询条件

func NewQueryModel

func NewQueryModel[T any, R any]() (*QueryCond[T], *T, *R)

NewQueryModel 构建查询条件

func (*QueryCond[T]) AddAndStrCond added in v0.0.4

func (q *QueryCond[T]) AddAndStrCond(cond string) *QueryCond[T]

AddAndStrCond 执行增加AND条件

func (*QueryCond[T]) AddOrStrCond added in v0.0.4

func (q *QueryCond[T]) AddOrStrCond(cond string) *QueryCond[T]

AddOrStrCond 执行增加OR条件

func (*QueryCond[T]) And

func (q *QueryCond[T]) And(fn ...func(q *QueryCond[T])) *QueryCond[T]

And 拼接 AND

func (*QueryCond[T]) AndCond added in v0.0.3

func (q *QueryCond[T]) AndCond(cond bool, fn ...func(q *QueryCond[T])) *QueryCond[T]

AndCond 拼接 AND

func (*QueryCond[T]) AndEqCond added in v0.0.4

func (q *QueryCond[T]) AndEqCond(cond bool, column any, val any) *QueryCond[T]

AndEqCond 并且等于 =

func (*QueryCond[T]) AndGeCond added in v0.0.4

func (q *QueryCond[T]) AndGeCond(cond bool, column any, val any) *QueryCond[T]

AndGeCond 并且大于等于 >=

func (*QueryCond[T]) AndGtCond added in v0.0.4

func (q *QueryCond[T]) AndGtCond(cond bool, column any, val any) *QueryCond[T]

AndGtCond 并且大于 >

func (*QueryCond[T]) AndInCond added in v0.0.4

func (q *QueryCond[T]) AndInCond(cond bool, column any, val any) *QueryCond[T]

AndInCond 并且字段 IN (值1, 值2, ...)

func (*QueryCond[T]) AndLeCond added in v0.0.4

func (q *QueryCond[T]) AndLeCond(cond bool, column any, val any) *QueryCond[T]

AndLeCond 并且小于等于 <=

func (*QueryCond[T]) AndLikeCond added in v0.0.4

func (q *QueryCond[T]) AndLikeCond(cond bool, column any, val any) *QueryCond[T]

AndLikeCond 并且模糊 LIKE '%值%'

func (*QueryCond[T]) AndLikeLeftCond added in v0.0.4

func (q *QueryCond[T]) AndLikeLeftCond(cond bool, column any, val any) *QueryCond[T]

AndLikeLeftCond 并且左模糊 LIKE '%值'

func (*QueryCond[T]) AndLikeRightCond added in v0.0.4

func (q *QueryCond[T]) AndLikeRightCond(cond bool, column any, val any) *QueryCond[T]

AndLikeRightCond 并且右模糊 LIKE '值%'

func (*QueryCond[T]) AndLtCond added in v0.0.4

func (q *QueryCond[T]) AndLtCond(cond bool, column any, val any) *QueryCond[T]

AndLtCond 并且小于 <

func (*QueryCond[T]) AndNeCond added in v0.0.4

func (q *QueryCond[T]) AndNeCond(cond bool, column any, val any) *QueryCond[T]

AndNeCond 并且不等于 !=

func (*QueryCond[T]) AndNotLikeCond added in v0.0.4

func (q *QueryCond[T]) AndNotLikeCond(cond bool, column any, val any) *QueryCond[T]

AndNotLikeCond 并且非模糊 NOT LIKE '%值%'

func (*QueryCond[T]) AndNotLikeLeftCond added in v0.0.4

func (q *QueryCond[T]) AndNotLikeLeftCond(cond bool, column any, val any) *QueryCond[T]

AndNotLikeLeftCond 并且非左模糊 NOT LIKE '%值'

func (*QueryCond[T]) AndNotLikeRightCond added in v0.0.4

func (q *QueryCond[T]) AndNotLikeRightCond(cond bool, column any, val any) *QueryCond[T]

AndNotLikeRightCond 并且非右模糊 NOT LIKE '值%'

func (*QueryCond[T]) Between

func (q *QueryCond[T]) Between(column any, start, end any) *QueryCond[T]

Between BETWEEN 值1 AND 值2

func (*QueryCond[T]) Case

func (q *QueryCond[T]) Case(isTrue bool, handleFunc func()) *QueryCond[T]

Case 根据条件,执行方法

func (*QueryCond[T]) Distinct

func (q *QueryCond[T]) Distinct(columns ...any) *QueryCond[T]

Distinct 去除重复字段值

func (*QueryCond[T]) Eq

func (q *QueryCond[T]) Eq(column any, val any) *QueryCond[T]

Eq 等于 =

func (*QueryCond[T]) EqCond added in v0.0.3

func (q *QueryCond[T]) EqCond(cond bool, column any, val any) *QueryCond[T]

EqCond 等于 =

func (*QueryCond[T]) Ge

func (q *QueryCond[T]) Ge(column any, val any) *QueryCond[T]

Ge 大于等于 >=

func (*QueryCond[T]) GeCond added in v0.0.3

func (q *QueryCond[T]) GeCond(cond bool, column any, val any) *QueryCond[T]

GeCond 大于等于 >=

func (*QueryCond[T]) Group

func (q *QueryCond[T]) Group(columns ...any) *QueryCond[T]

Group 分组:GROUP BY 字段1,字段2

func (*QueryCond[T]) Gt

func (q *QueryCond[T]) Gt(column any, val any) *QueryCond[T]

Gt 大于 >

func (*QueryCond[T]) GtCond added in v0.0.3

func (q *QueryCond[T]) GtCond(cond bool, column any, val any) *QueryCond[T]

GtCond 大于 >

func (*QueryCond[T]) Having

func (q *QueryCond[T]) Having(having string, args ...any) *QueryCond[T]

Having HAVING SQl语句

func (*QueryCond[T]) In

func (q *QueryCond[T]) In(column any, val any) *QueryCond[T]

In 字段 IN (值1, 值2, ...)

func (*QueryCond[T]) InCond added in v0.0.3

func (q *QueryCond[T]) InCond(cond bool, column any, val any) *QueryCond[T]

InCond 字段 IN (值1, 值2, ...)

func (*QueryCond[T]) IsNotNull

func (q *QueryCond[T]) IsNotNull(column any) *QueryCond[T]

IsNotNull 是否非空 字段 IS NOT NULL

func (*QueryCond[T]) IsNull

func (q *QueryCond[T]) IsNull(column any) *QueryCond[T]

IsNull 是否为空 字段 IS NULL

func (*QueryCond[T]) Le

func (q *QueryCond[T]) Le(column any, val any) *QueryCond[T]

Le 小于等于 <=

func (*QueryCond[T]) LeCond added in v0.0.3

func (q *QueryCond[T]) LeCond(cond bool, column any, val any) *QueryCond[T]

LeCond 小于等于 <=

func (*QueryCond[T]) Like

func (q *QueryCond[T]) Like(column any, val any) *QueryCond[T]

Like 模糊 LIKE '%值%'

func (*QueryCond[T]) LikeCond added in v0.0.3

func (q *QueryCond[T]) LikeCond(cond bool, column any, val any) *QueryCond[T]

LikeCond 模糊 LIKE '%值%'

func (*QueryCond[T]) LikeLeft

func (q *QueryCond[T]) LikeLeft(column any, val any) *QueryCond[T]

LikeLeft 左模糊 LIKE '%值'

func (*QueryCond[T]) LikeLeftCond added in v0.0.3

func (q *QueryCond[T]) LikeLeftCond(cond bool, column any, val any) *QueryCond[T]

LikeLeftCond 左模糊 LIKE '%值'

func (*QueryCond[T]) LikeRight

func (q *QueryCond[T]) LikeRight(column any, val any) *QueryCond[T]

LikeRight 右模糊 LIKE '值%'

func (*QueryCond[T]) LikeRightCond added in v0.0.3

func (q *QueryCond[T]) LikeRightCond(cond bool, column any, val any) *QueryCond[T]

LikeRightCond 右模糊 LIKE '值%'

func (*QueryCond[T]) Lt

func (q *QueryCond[T]) Lt(column any, val any) *QueryCond[T]

Lt 小于 <

func (*QueryCond[T]) LtCond added in v0.0.3

func (q *QueryCond[T]) LtCond(cond bool, column any, val any) *QueryCond[T]

LtCond 小于 <

func (*QueryCond[T]) Ne

func (q *QueryCond[T]) Ne(column any, val any) *QueryCond[T]

Ne 不等于 !=

func (*QueryCond[T]) NeCond added in v0.0.3

func (q *QueryCond[T]) NeCond(cond bool, column any, val any) *QueryCond[T]

NeCond 不等于 !=

func (*QueryCond[T]) NotBetween

func (q *QueryCond[T]) NotBetween(column any, start, end any) *QueryCond[T]

NotBetween NOT BETWEEN 值1 AND 值2

func (*QueryCond[T]) NotIn

func (q *QueryCond[T]) NotIn(column any, val any) *QueryCond[T]

NotIn 字段 NOT IN (值1, 值2, ...)

func (*QueryCond[T]) NotLike

func (q *QueryCond[T]) NotLike(column any, val any) *QueryCond[T]

NotLike 非模糊 NOT LIKE '%值%'

func (*QueryCond[T]) NotLikeCond added in v0.0.3

func (q *QueryCond[T]) NotLikeCond(cond bool, column any, val any) *QueryCond[T]

NotLikeCond 非模糊 NOT LIKE '%值%'

func (*QueryCond[T]) NotLikeLeft added in v0.0.3

func (q *QueryCond[T]) NotLikeLeft(column any, val any) *QueryCond[T]

NotLikeLeft 非左模糊 NOT LIKE '%值'

func (*QueryCond[T]) NotLikeLeftCond added in v0.0.3

func (q *QueryCond[T]) NotLikeLeftCond(cond bool, column any, val any) *QueryCond[T]

NotLikeLeftCond 非左模糊 NOT LIKE '%值'

func (*QueryCond[T]) NotLikeRight added in v0.0.3

func (q *QueryCond[T]) NotLikeRight(column any, val any) *QueryCond[T]

NotLikeRight 非右模糊 NOT LIKE '值%'

func (*QueryCond[T]) NotLikeRightCond added in v0.0.3

func (q *QueryCond[T]) NotLikeRightCond(cond bool, column any, val any) *QueryCond[T]

NotLikeRightCond 非右模糊 NOT LIKE '值%'

func (*QueryCond[T]) Omit added in v0.0.3

func (q *QueryCond[T]) Omit(columns ...any) *QueryCond[T]

Omit 忽略字段

func (*QueryCond[T]) Or

func (q *QueryCond[T]) Or(fn ...func(q *QueryCond[T])) *QueryCond[T]

Or 拼接 OR

func (*QueryCond[T]) OrCond added in v0.0.3

func (q *QueryCond[T]) OrCond(cond bool, fn ...func(q *QueryCond[T])) *QueryCond[T]

OrCond 拼接 OR

func (*QueryCond[T]) OrEqCond added in v0.0.4

func (q *QueryCond[T]) OrEqCond(cond bool, column any, val any) *QueryCond[T]

OrEqCond 或者等于 =

func (*QueryCond[T]) OrGeCond added in v0.0.4

func (q *QueryCond[T]) OrGeCond(cond bool, column any, val any) *QueryCond[T]

OrGeCond 或者大于等于 >=

func (*QueryCond[T]) OrGtCond added in v0.0.4

func (q *QueryCond[T]) OrGtCond(cond bool, column any, val any) *QueryCond[T]

OrGtCond 或者大于 >

func (*QueryCond[T]) OrInCond added in v0.0.4

func (q *QueryCond[T]) OrInCond(cond bool, column any, val any) *QueryCond[T]

OrInCond 或者字段 IN (值1, 值2, ...)

func (*QueryCond[T]) OrLeCond added in v0.0.4

func (q *QueryCond[T]) OrLeCond(cond bool, column any, val any) *QueryCond[T]

OrLeCond 或者小于等于 <=

func (*QueryCond[T]) OrLikeCond added in v0.0.4

func (q *QueryCond[T]) OrLikeCond(cond bool, column any, val any) *QueryCond[T]

OrLikeCond 或者模糊 LIKE '%值%'

func (*QueryCond[T]) OrLikeLeftCond added in v0.0.4

func (q *QueryCond[T]) OrLikeLeftCond(cond bool, column any, val any) *QueryCond[T]

OrLikeLeftCond 或者左模糊 LIKE '%值'

func (*QueryCond[T]) OrLikeRightCond added in v0.0.4

func (q *QueryCond[T]) OrLikeRightCond(cond bool, column any, val any) *QueryCond[T]

OrLikeRightCond 或者右模糊 LIKE '值%'

func (*QueryCond[T]) OrLtCond added in v0.0.4

func (q *QueryCond[T]) OrLtCond(cond bool, column any, val any) *QueryCond[T]

OrLtCond 或者小于 <

func (*QueryCond[T]) OrNeCond added in v0.0.4

func (q *QueryCond[T]) OrNeCond(cond bool, column any, val any) *QueryCond[T]

OrNeCond 或者不等于 !=

func (*QueryCond[T]) OrNotLikeCond added in v0.0.4

func (q *QueryCond[T]) OrNotLikeCond(cond bool, column any, val any) *QueryCond[T]

OrNotLikeCond 或者非模糊 NOT LIKE '%值%'

func (*QueryCond[T]) OrNotLikeLeftCond added in v0.0.4

func (q *QueryCond[T]) OrNotLikeLeftCond(cond bool, column any, val any) *QueryCond[T]

OrNotLikeLeftCond 或者非左模糊 NOT LIKE '%值'

func (*QueryCond[T]) OrNotLikeRightCond added in v0.0.4

func (q *QueryCond[T]) OrNotLikeRightCond(cond bool, column any, val any) *QueryCond[T]

OrNotLikeRightCond 或者非右模糊 NOT LIKE '值%'

func (*QueryCond[T]) OrderByAsc

func (q *QueryCond[T]) OrderByAsc(columns ...any) *QueryCond[T]

OrderByAsc 排序:ORDER BY 字段1,字段2 ASC

func (*QueryCond[T]) OrderByDesc

func (q *QueryCond[T]) OrderByDesc(columns ...any) *QueryCond[T]

OrderByDesc 排序:ORDER BY 字段1,字段2 Desc

func (*QueryCond[T]) Reset

func (q *QueryCond[T]) Reset() *QueryCond[T]

Reset 重置查询条件

func (*QueryCond[T]) Select

func (q *QueryCond[T]) Select(columns ...any) *QueryCond[T]

Select 查询字段

func (*QueryCond[T]) Set

func (q *QueryCond[T]) Set(column any, val any) *QueryCond[T]

Set 设置更新的字段

type SQLSegment added in v0.0.6

type SQLSegment interface {
	// contains filtered or unexported methods
}

type StreamingPage added in v0.0.4

type StreamingPage[T any, V Comparable] struct {
	ColumnName any   `json:"columnName"` // 进行分页的列字段名称
	StartValue V     `json:"startValue"` // 分页起始值
	Limit      int   `json:"limit"`      // 页大小
	Forward    bool  `json:"forward"`    // 上下页翻页标识
	Total      int64 `json:"total"`      // 总记录数
	Records    []*T  `json:"records"`    // 查询记录
	RecordsMap []T   `json:"recordsMap"` // 查询记录Map
}

StreamingPage 流式分页查询结构

func NewStreamingPage added in v0.0.4

func NewStreamingPage[T any, V Comparable](columnName any, startValue V, limit int) *StreamingPage[T, V]

NewStreamingPage 流式分页查询

func SelectStreamingPage added in v0.0.4

func SelectStreamingPage[T any, V Comparable](page *StreamingPage[T, V], q *QueryCond[T], opts ...OptionFunc) (*StreamingPage[T, V], *gorm.DB)

SelectStreamingPage 根据条件分页查询记录

func SelectStreamingPageGeneric added in v0.0.4

func SelectStreamingPageGeneric[T any, R any, V Comparable](page *StreamingPage[R, V], q *QueryCond[T], opts ...OptionFunc) (*StreamingPage[R, V], *gorm.DB)

SelectStreamingPageGeneric 根据传入的泛型封装分页记录 第一个泛型代表数据库表实体 第二个泛型代表返回记录实体

Jump to

Keyboard shortcuts

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