Documentation ¶
Index ¶
- func Bool(raw *bool) bool
- func BoolP(b bool) *bool
- func CalcTags(origin []string, op string, now []string) []string
- func CalcTagsP(origin []string, op *string, now []string) []string
- func ExactExcludeQueryInt64Array(db *gorm.DB, field string, s []int64) *gorm.DB
- func ExactOrQueryArrayOr(db *gorm.DB, field string, s []interface{}) *gorm.DB
- func ExactOrQueryStringArrayOr(db *gorm.DB, field string, s []string) *gorm.DB
- func ExactQueryArrayOr(db *gorm.DB, field string, s []interface{}) *gorm.DB
- func ExactQueryExcludeArrayOr(db *gorm.DB, field string, s []interface{}) *gorm.DB
- func ExactQueryExcludeStringArrayOr(db *gorm.DB, field string, s []string) *gorm.DB
- func ExactQueryInt64(db *gorm.DB, field string, value int64) *gorm.DB
- func ExactQueryInt64ArrayOr(db *gorm.DB, field string, s []int64) *gorm.DB
- func ExactQueryInt64P(db *gorm.DB, field string, value *int64) *gorm.DB
- func ExactQueryIntArrayOr(db *gorm.DB, field string, s []int) *gorm.DB
- func ExactQueryString(db *gorm.DB, field string, value string) *gorm.DB
- func ExactQueryStringArrayOr(db *gorm.DB, field string, s []string) *gorm.DB
- func ExactQueryStringP(db *gorm.DB, field string, valueP *string) *gorm.DB
- func Float64(raw *float64) float64
- func Float64P(i float64) *float64
- func Float64PWithFixed(i float64) *float64
- func FuzzQuery(db *gorm.DB, field string, value string) *gorm.DB
- func FuzzQueryArrayOr(db *gorm.DB, field string, s []interface{}) *gorm.DB
- func FuzzQueryArrayOrLike(db *gorm.DB, field string, s []interface{}) *gorm.DB
- func FuzzQueryArrayOrLikeExclude(db *gorm.DB, field string, s []interface{}) *gorm.DB
- func FuzzQueryArrayOrPrefixLike(db *gorm.DB, field string, s []interface{}) *gorm.DB
- func FuzzQueryInt64ArrayOr(db *gorm.DB, field string, s []int64) *gorm.DB
- func FuzzQueryIntArrayOr(db *gorm.DB, field string, s []int) *gorm.DB
- func FuzzQueryJsonText(db *gorm.DB, jsonField string, search string) *gorm.DB
- func FuzzQueryJsonTextP(db *gorm.DB, jsonField string, search *string) *gorm.DB
- func FuzzQueryLike(db *gorm.DB, field string, value string) *gorm.DB
- func FuzzQueryP(db *gorm.DB, field string, valueP *string) *gorm.DB
- func FuzzQueryPostgresStringArray(db *gorm.DB, tableName string, subQueryField string, ...) *gorm.DB
- func FuzzQueryPrefixLike(db *gorm.DB, field string, value string) *gorm.DB
- func FuzzQueryStrP(db *gorm.DB, field string, value *string) *gorm.DB
- func FuzzQueryStringArrayOr(db *gorm.DB, field string, s []string) *gorm.DB
- func FuzzQueryStringArrayOrLike(db *gorm.DB, field string, s []string) *gorm.DB
- func FuzzQueryStringArrayOrLikeExclude(db *gorm.DB, field string, s []string) *gorm.DB
- func FuzzQueryStringArrayOrPrefixLike(db *gorm.DB, field string, s []string) *gorm.DB
- func FuzzQueryStringByFieldsOr(db *gorm.DB, fields []string, keyword string) *gorm.DB
- func FuzzQueryStringByFieldsOrP(db *gorm.DB, fields []string, keyword *string) *gorm.DB
- func FuzzSearch(db *gorm.DB, fields []string, target string) *gorm.DB
- func FuzzSearchEx(db *gorm.DB, fields []string, target string, ilike bool) *gorm.DB
- func FuzzSearchP(db *gorm.DB, fields []string, target *string) *gorm.DB
- func FuzzSearchWithStringArrayOr(db *gorm.DB, fields []string, targets []string) *gorm.DB
- func FuzzSearchWithStringArrayOrAf(db *gorm.DB, fields []string, targets []string, ilike bool) *gorm.DB
- func FuzzSearchWithStringArrayOrEx(db *gorm.DB, fields []string, targets []string, ilike bool) *gorm.DB
- func GetFloat64ValueOr(raw *float64, value float64) float64
- func GetInt64ValueOr(raw *int64, value int64) int64
- func GetStrValueOr(raw *string, value string) string
- func Int(raw *int64) int
- func Int64(raw *int64) int64
- func Int64P(i int64) *int64
- func Int64P2Int(raw *int64) int
- func IntToInt64P(i int) *int64
- func OrFuzzQueryArrayOrLike(db *gorm.DB, field string, s []interface{}) *gorm.DB
- func OrFuzzQueryStringArrayOrLike(db *gorm.DB, field string, s []string) *gorm.DB
- func PrefixQueryString(db *gorm.DB, field string, value string) *gorm.DB
- func PrefixQueryStringP(db *gorm.DB, field string, valueP *string) *gorm.DB
- func QueryByBool(db *gorm.DB, field string, v bool) *gorm.DB
- func QueryByBoolP(db *gorm.DB, byField string, v *bool) *gorm.DB
- func QueryByJsonKey(db *gorm.DB, field string, filter map[string]interface{}) *gorm.DB
- func QueryByJsonKeyList(db *gorm.DB, field string, keys *string, values *string, sep string) *gorm.DB
- func QueryBySpecificAddress(db *gorm.DB, field string, targets string) *gorm.DB
- func QueryBySpecificAddressP(db *gorm.DB, field string, targets *string) *gorm.DB
- func QueryBySpecificPorts(db *gorm.DB, field string, ports string) *gorm.DB
- func QueryByTimeRange(db *gorm.DB, field string, start, end time.Time) *gorm.DB
- func QueryByTimeRangeWithTimestamp(db *gorm.DB, field string, startTs, endTs int64) *gorm.DB
- func QueryByTimeRangeWithTimestampP(db *gorm.DB, field string, startTs, endTs *int64) *gorm.DB
- func QueryByTimestampRange(db *gorm.DB, field string, start, end int64) *gorm.DB
- func QueryByTimestampRangeP(db *gorm.DB, field string, start, end *int64) *gorm.DB
- func QueryCount(db *gorm.DB, m interface{}, items *GormWhereBlock) int
- func QueryDateTimeAfterTimestampOr(db *gorm.DB, field string, timestamp int64) *gorm.DB
- func QueryDateTimeBeforeTimestampOr(db *gorm.DB, field string, timestamp int64) *gorm.DB
- func QueryIntegerInArrayInt64(db *gorm.DB, field string, targets []int64) *gorm.DB
- func QueryLargerThanFloatOr_AboveZero(db *gorm.DB, field string, value float64) *gorm.DB
- func QueryLargerThanInt(db *gorm.DB, field string, value *int64) *gorm.DB
- func QueryLargerThanIntOr_AboveZero(db *gorm.DB, field string, value int64) *gorm.DB
- func QueryLessThanInt(db *gorm.DB, field string, value *int64) *gorm.DB
- func QueryOrder(db *gorm.DB, byField, order string) *gorm.DB
- func QueryOrderP(db *gorm.DB, orderBy, order *string) *gorm.DB
- func QueryPostgresArrayCommonElements(db *gorm.DB, field string, arrayType string, t []string) *gorm.DB
- func QueryStringInStringSlice(db *gorm.DB, field string, targets []string) *gorm.DB
- func StartswithString(db *gorm.DB, field string, value string) *gorm.DB
- func StartswithStringArrayOr(db *gorm.DB, field string, value []string) *gorm.DB
- func StartswithStringLike(db *gorm.DB, field string, value string) *gorm.DB
- func StartswithStringP(db *gorm.DB, field string, valueP *string) *gorm.DB
- func Str(raw *string) string
- func StrEmptyOr(raw *string, value string) string
- func StrP(i string) *string
- type GormWhereBlock
- type Paginator
- func NewPagination(p *Param, result interface{}) (*Paginator, *gorm.DB)
- func Paging(db *gorm.DB, page int, limit int, data interface{}) (*Paginator, *gorm.DB)
- func PagingByPagination(db *gorm.DB, p *ypb.Paging, data any) (*Paginator, *gorm.DB)
- func PagingP(db *gorm.DB, page *int64, limit *int64, data interface{}) (*Paginator, *gorm.DB)
- type Param
- type Range
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExactExcludeQueryInt64Array ¶ added in v1.3.1
func ExactOrQueryArrayOr ¶
func ExactQueryArrayOr ¶
func ExactQueryInt64ArrayOr ¶
func ExactQueryStringArrayOr ¶
func Float64PWithFixed ¶
func FuzzQueryArrayOrLike ¶
FuzzQueryArrayOrLike
func FuzzQueryArrayOrLikeExclude ¶
FuzzQueryArrayOrLike
func FuzzQueryInt64ArrayOr ¶
func FuzzQueryJsonText ¶
func FuzzQueryJsonTextP ¶
func FuzzQueryPrefixLike ¶
func FuzzQueryStringArrayOr ¶
func FuzzSearchEx ¶
func GetFloat64ValueOr ¶
func GetInt64ValueOr ¶
func GetStrValueOr ¶
func Int64P2Int ¶
func IntToInt64P ¶
func OrFuzzQueryArrayOrLike ¶
func PrefixQueryStringP ¶
func QueryByJsonKey ¶
func QueryByJsonKeyList ¶
func QueryBySpecificAddress ¶
func QueryBySpecificAddressP ¶
func QueryBySpecificPorts ¶
func QueryByTimeRange ¶
func QueryByTimestampRange ¶
func QueryByTimestampRangeP ¶
func QueryCount ¶
func QueryCount(db *gorm.DB, m interface{}, items *GormWhereBlock) int
func StartswithStringArrayOr ¶
func StartswithStringLike ¶
func StrEmptyOr ¶
Types ¶
type GormWhereBlock ¶
type GormWhereBlock struct { Cond string Items []interface{} }
func MergeAndGormWhereBlocks ¶
func MergeAndGormWhereBlocks(blocks []*GormWhereBlock) *GormWhereBlock
func MergeOrGormWhereBlocks ¶
func MergeOrGormWhereBlocks(blocks []*GormWhereBlock) *GormWhereBlock
type Paginator ¶
type Paginator struct { TotalRecord int `json:"total_record"` TotalPage int `json:"total_page"` Records interface{} `json:"records"` Offset int `json:"offset"` Limit int `json:"limit"` Page int `json:"page"` PrevPage int `json:"prev_page"` NextPage int `json:"next_page"` }
Paginator 分页返回
func NewPagination ¶
Paging 分页
func PagingByPagination ¶ added in v1.2.8
Click to show internal directories.
Click to hide internal directories.