ops

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const CacheKeyColumnsField = "CACHE_KEY_COLUMNS_FIELD"
View Source
const CacheKeyGroupFields = "CACHE_KEY_QUERY_FIELDS"
View Source
const CacheKeyObjectField = "CACHE_KEY_OBJECT_FIELD"
View Source
const CacheKeyQueryFields = "CACHE_KEY_QUERY_FIELDS"
View Source
const RegexMatchJsonObjectItem = `'\w+'\s*,\s+(\w+\.\w+)`

Variables

This section is empty.

Functions

func As

func As(plain string, alias string) string

func IsBlank

func IsBlank(prefixOrKey string) bool

func JsonArrayExtract

func JsonArrayExtract(jsonOrRawSql string, index int, alias ...string) string

func JsonArraySet

func JsonArraySet(jsonOrRawSql string, index int, data any, alias ...string) string

func JsonContains

func JsonContains(jsonOrRawSql string, data any, alias ...string) string

func JsonDepth

func JsonDepth(jsonOrRawSql string, alias ...string) string

func JsonExtract

func JsonExtract(jsonOrRawSql string, key string, alias ...string) string

func JsonLength

func JsonLength(jsonOrRawSql string, alias ...string) string

func JsonSet

func JsonSet(jsonOrRawSql string, key string, data any, alias ...string) string

func JsonSetColumn

func JsonSetColumn(rawString string, key string, column string, alias ...string) string

func JsonStorageSize

func JsonStorageSize(jsonOrRawSql string, alias ...string) string

func JsonType

func JsonType(jsonOrRawSql string, alias ...string) string

func JsonValid

func JsonValid(jsonOrRawSql string, alias ...string) string

Types

type ConcatOpsImpl

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

func ConcatOps

func ConcatOps() *ConcatOpsImpl

func (*ConcatOpsImpl) As

func (s *ConcatOpsImpl) As(alias ...string) string

func (*ConcatOpsImpl) Concat

func (s *ConcatOpsImpl) Concat(str ...string) *ConcatOpsImpl

func (*ConcatOpsImpl) ConcatColumn

func (s *ConcatOpsImpl) ConcatColumn(column string) *ConcatOpsImpl

func (*ConcatOpsImpl) ConcatString

func (s *ConcatOpsImpl) ConcatString(plain string) *ConcatOpsImpl

func (*ConcatOpsImpl) Items

func (s *ConcatOpsImpl) Items() string

func (*ConcatOpsImpl) Omitempty

func (s *ConcatOpsImpl) Omitempty() *ConcatOpsImpl

type ConcatWsOpsImpl

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

func ConcatWsOps

func ConcatWsOps() *ConcatWsOpsImpl

func (*ConcatWsOpsImpl) As

func (s *ConcatWsOpsImpl) As(alias ...string) string

func (*ConcatWsOpsImpl) ConcatColumn

func (s *ConcatWsOpsImpl) ConcatColumn(column string) *ConcatWsOpsImpl

func (*ConcatWsOpsImpl) ConcatString

func (s *ConcatWsOpsImpl) ConcatString(plain string) *ConcatWsOpsImpl

func (*ConcatWsOpsImpl) ConcatWs

func (s *ConcatWsOpsImpl) ConcatWs(split string, str ...string) *ConcatWsOpsImpl

func (*ConcatWsOpsImpl) ConcatWsSplit

func (s *ConcatWsOpsImpl) ConcatWsSplit(split string) *ConcatWsOpsImpl

func (*ConcatWsOpsImpl) GetSplitString

func (s *ConcatWsOpsImpl) GetSplitString() string

func (*ConcatWsOpsImpl) Items

func (s *ConcatWsOpsImpl) Items() string

func (*ConcatWsOpsImpl) Omitempty

func (s *ConcatWsOpsImpl) Omitempty() *ConcatWsOpsImpl

type FieldOpsImpl

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

func FieldOps

func FieldOps() *FieldOpsImpl

func (*FieldOpsImpl) ExcludeByAlias

func (f *FieldOpsImpl) ExcludeByAlias(keys ...string) *FieldOpsImpl

func (*FieldOpsImpl) ExcludeByColumns

func (f *FieldOpsImpl) ExcludeByColumns(keys ...string) *FieldOpsImpl

func (*FieldOpsImpl) ExcludeRawSql

func (f *FieldOpsImpl) ExcludeRawSql(keys ...string) *FieldOpsImpl

func (*FieldOpsImpl) Fields

func (f *FieldOpsImpl) Fields() []string

func (*FieldOpsImpl) Include

func (f *FieldOpsImpl) Include(key string, alias string) *FieldOpsImpl

func (*FieldOpsImpl) IncludeMap

func (f *FieldOpsImpl) IncludeMap(columns any) *FieldOpsImpl

func (*FieldOpsImpl) IncludePrefixColumns

func (f *FieldOpsImpl) IncludePrefixColumns(prefix string, columns any) *FieldOpsImpl

func (*FieldOpsImpl) IncludePrefixMap

func (f *FieldOpsImpl) IncludePrefixMap(prefix string, columns any) *FieldOpsImpl

func (*FieldOpsImpl) IncludePrefixObject

func (f *FieldOpsImpl) IncludePrefixObject(prefix string, columns any) *FieldOpsImpl

func (*FieldOpsImpl) IncludePrefixSlice

func (f *FieldOpsImpl) IncludePrefixSlice(prefixOrKey string, columns any) *FieldOpsImpl

func (*FieldOpsImpl) IncludeRawSql

func (f *FieldOpsImpl) IncludeRawSql(rawSql string) *FieldOpsImpl

func (*FieldOpsImpl) Items

func (f *FieldOpsImpl) Items() []string

func (*FieldOpsImpl) Omitempty

func (f *FieldOpsImpl) Omitempty() *FieldOpsImpl

type FieldsInterface

type FieldsInterface interface {
	GetQueryFields() []string
	GetGroupFields() []string
}

type FieldsOpsImpl

type FieldsOpsImpl[T FieldsInterface] struct {
	// contains filtered or unexported fields
}

func FieldsOps

func FieldsOps[T FieldsInterface]() *FieldsOpsImpl[T]

func (*FieldsOpsImpl[T]) GetGroupFields

func (f *FieldsOpsImpl[T]) GetGroupFields(cached ...bool) []string

func (*FieldsOpsImpl[T]) GetQueryFields

func (f *FieldsOpsImpl[T]) GetQueryFields(cached ...bool) []string

type GroupOpsImpl

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

func GroupOps

func GroupOps() *GroupOpsImpl

func (*GroupOpsImpl) Exclude

func (g *GroupOpsImpl) Exclude(keys ...string) *GroupOpsImpl

func (*GroupOpsImpl) GetGroupFields

func (g *GroupOpsImpl) GetGroupFields() []string

func (*GroupOpsImpl) IncludePrefixColumns

func (g *GroupOpsImpl) IncludePrefixColumns(prefix string, columns any) *GroupOpsImpl

func (*GroupOpsImpl) IncludePrefixObject

func (g *GroupOpsImpl) IncludePrefixObject(prefix string, columns any) *GroupOpsImpl

func (*GroupOpsImpl) IncludePrefixSlice

func (g *GroupOpsImpl) IncludePrefixSlice(prefixOrKey string, columns any) *GroupOpsImpl

type JsonArrayAggOpsImpl

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

func JsonArrayAggOps

func JsonArrayAggOps() *JsonArrayAggOpsImpl

func (*JsonArrayAggOpsImpl) As

func (j *JsonArrayAggOpsImpl) As(alias ...string) string

func (*JsonArrayAggOpsImpl) Include

func (j *JsonArrayAggOpsImpl) Include(field string) *JsonArrayAggOpsImpl

func (*JsonArrayAggOpsImpl) Items

func (j *JsonArrayAggOpsImpl) Items() string

type JsonArrayOpsImpl

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

func JsonArrayOps

func JsonArrayOps() *JsonArrayOpsImpl

func (*JsonArrayOpsImpl) As

func (j *JsonArrayOpsImpl) As(alias ...string) string

func (*JsonArrayOpsImpl) Include

func (j *JsonArrayOpsImpl) Include(data any) *JsonArrayOpsImpl

func (*JsonArrayOpsImpl) IncludeColumn

func (j *JsonArrayOpsImpl) IncludeColumn(column string) *JsonArrayOpsImpl

func (*JsonArrayOpsImpl) Items

func (j *JsonArrayOpsImpl) Items() string

type JsonObjectOpsImpl

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

func JsonObjectOps

func JsonObjectOps() *JsonObjectOpsImpl

func (*JsonObjectOpsImpl) As

func (j *JsonObjectOpsImpl) As(alias ...string) string

func (*JsonObjectOpsImpl) Exclude

func (j *JsonObjectOpsImpl) Exclude(keys ...string) *JsonObjectOpsImpl

func (*JsonObjectOpsImpl) IncludeItem

func (j *JsonObjectOpsImpl) IncludeItem(key string, value string) *JsonObjectOpsImpl

func (*JsonObjectOpsImpl) IncludeMap

func (j *JsonObjectOpsImpl) IncludeMap(columns any) *JsonObjectOpsImpl

func (*JsonObjectOpsImpl) IncludePrefixColumns

func (j *JsonObjectOpsImpl) IncludePrefixColumns(prefixOrKey string, columns any) *JsonObjectOpsImpl

func (*JsonObjectOpsImpl) IncludePrefixMap

func (j *JsonObjectOpsImpl) IncludePrefixMap(prefixOrKey string, columns any) *JsonObjectOpsImpl

func (*JsonObjectOpsImpl) IncludePrefixObject

func (j *JsonObjectOpsImpl) IncludePrefixObject(prefixOrKey string, columns any) *JsonObjectOpsImpl

func (*JsonObjectOpsImpl) IncludePrefixSlice

func (j *JsonObjectOpsImpl) IncludePrefixSlice(prefixOrKey string, columns any) *JsonObjectOpsImpl

func (*JsonObjectOpsImpl) Items

func (j *JsonObjectOpsImpl) Items() []string

func (*JsonObjectOpsImpl) Omitempty

func (j *JsonObjectOpsImpl) Omitempty() *JsonObjectOpsImpl

type StringOpsImpl

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

func StringOps

func StringOps() *StringOpsImpl

func (*StringOpsImpl) As

func (s *StringOpsImpl) As(alias ...string) string

func (*StringOpsImpl) FromColumn

func (s *StringOpsImpl) FromColumn(column string) *StringOpsImpl

func (*StringOpsImpl) FromStr

func (s *StringOpsImpl) FromStr(str string) *StringOpsImpl

func (*StringOpsImpl) Instr

func (s *StringOpsImpl) Instr(find string) *StringOpsImpl

func (*StringOpsImpl) Left

func (s *StringOpsImpl) Left(length int) *StringOpsImpl

func (*StringOpsImpl) Length

func (s *StringOpsImpl) Length() *StringOpsImpl

func (*StringOpsImpl) Locate

func (s *StringOpsImpl) Locate(find string, start int) *StringOpsImpl

func (*StringOpsImpl) Lower

func (s *StringOpsImpl) Lower() *StringOpsImpl

func (*StringOpsImpl) Replace

func (s *StringOpsImpl) Replace(find string, replace string) *StringOpsImpl

func (*StringOpsImpl) Reverse

func (s *StringOpsImpl) Reverse() *StringOpsImpl

func (*StringOpsImpl) Right

func (s *StringOpsImpl) Right(length int) *StringOpsImpl

func (*StringOpsImpl) SubString

func (s *StringOpsImpl) SubString(start int, length int) *StringOpsImpl

func (*StringOpsImpl) Trim

func (s *StringOpsImpl) Trim() *StringOpsImpl

func (*StringOpsImpl) Upper

func (s *StringOpsImpl) Upper() *StringOpsImpl

Jump to

Keyboard shortcuts

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