Documentation ¶
Index ¶
- Constants
- func DisableCacheHashCheck()
- func EscapeRedisSearchString(val string) string
- type AggregateReduce
- func NewAggregateReduceAvg(property, alias string) AggregateReduce
- func NewAggregateReduceCount(alias string) AggregateReduce
- func NewAggregateReduceCountDistinct(property, alias string, distinctish bool) AggregateReduce
- func NewAggregateReduceFirstValue(property, alias string) AggregateReduce
- func NewAggregateReduceFirstValueBy(property, byProperty, alias string, desc bool) AggregateReduce
- func NewAggregateReduceMax(property, alias string) AggregateReduce
- func NewAggregateReduceMin(property, alias string) AggregateReduce
- func NewAggregateReduceQuantile(property, quantile, alias string) AggregateReduce
- func NewAggregateReduceRandomSample(property, alias string, size ...int) AggregateReduce
- func NewAggregateReduceStdDev(property, alias string) AggregateReduce
- func NewAggregateReduceSum(property, alias string) AggregateReduce
- func NewAggregateReduceToList(property, alias string) AggregateReduce
- type Alter
- type BackgroundConsumer
- type Bind
- type CachedQuery
- type DB
- func (db *DB) Begin()
- func (db *DB) Commit()
- func (db *DB) Exec(query string, args ...interface{}) ExecResult
- func (db *DB) GetPoolConfig() MySQLPoolConfig
- func (db *DB) IsInTransaction() bool
- func (db *DB) Query(query string, args ...interface{}) (rows Rows, close func())
- func (db *DB) QueryRow(query *Where, toFill ...interface{}) (found bool)
- func (db *DB) Rollback()
- type DirtyEntityEvent
- type DuplicatedKeyError
- type Engine
- func (e *Engine) CachedSearch(entities interface{}, indexName string, pager *Pager, arguments ...interface{}) (totalRows int)
- func (e *Engine) CachedSearchCount(entity Entity, indexName string, arguments ...interface{}) int
- func (e *Engine) CachedSearchIDs(entity Entity, indexName string, pager *Pager, arguments ...interface{}) (totalRows int, ids []uint64)
- func (e *Engine) CachedSearchOne(entity Entity, indexName string, arguments ...interface{}) (found bool)
- func (e *Engine) CachedSearchOneWithReferences(entity Entity, indexName string, arguments []interface{}, references []string) (found bool)
- func (e *Engine) CachedSearchWithReferences(entities interface{}, indexName string, pager *Pager, arguments []interface{}, ...) (totalRows int)
- func (e *Engine) ClearCacheByIDs(entity Entity, ids ...uint64)
- func (e *Engine) Clone() *Engine
- func (e *Engine) Delete(entity Entity)
- func (e *Engine) DeleteLazy(entity Entity)
- func (e *Engine) DeleteMany(entities ...Entity)
- func (e *Engine) EnableQueryDebug()
- func (e *Engine) EnableQueryDebugCustom(mysql, redis, local bool)
- func (e *Engine) EnableRequestCache()
- func (e *Engine) Flush(entity Entity)
- func (e *Engine) FlushLazy(entity Entity)
- func (e *Engine) FlushLazyMany(entities ...Entity)
- func (e *Engine) FlushMany(entities ...Entity)
- func (e *Engine) FlushWithCheck(entity ...Entity) error
- func (e *Engine) FlushWithFullCheck(entity ...Entity) error
- func (e *Engine) ForceDelete(entity Entity)
- func (e *Engine) ForceDeleteMany(entities ...Entity)
- func (e *Engine) GetAlters() (alters []Alter)
- func (e *Engine) GetEventBroker() EventBroker
- func (e *Engine) GetLocalCache(code ...string) *LocalCache
- func (e *Engine) GetMysql(code ...string) *DB
- func (e *Engine) GetRedis(code ...string) *RedisCache
- func (e *Engine) GetRedisSearch(code ...string) *RedisSearch
- func (e *Engine) GetRedisSearchIndexAlters() (alters []RedisSearchIndexAlter)
- func (e *Engine) GetRegistry() ValidatedRegistry
- func (e *Engine) Load(entity Entity, references ...string) (found bool)
- func (e *Engine) LoadByID(id uint64, entity Entity, references ...string) (found bool)
- func (e *Engine) LoadByIDs(ids []uint64, entities interface{}, references ...string) (found bool)
- func (e *Engine) MarkDirty(entity Entity, queueCode string, ids ...uint64)
- func (e *Engine) NewFlusher() Flusher
- func (e *Engine) NewRedisSearchIndexPusher(pool string) RedisSearchIndexPusher
- func (e *Engine) RedisSearch(entities interface{}, query *RedisSearchQuery, pager *Pager, ...) (totalRows uint64)
- func (e *Engine) RedisSearchAggregate(entity Entity, query *RedisSearchAggregate, pager *Pager) (result []map[string]string, totalRows uint64)
- func (e *Engine) RedisSearchCount(entity Entity, query *RedisSearchQuery) (totalRows uint64)
- func (e *Engine) RedisSearchIds(entity Entity, query *RedisSearchQuery, pager *Pager) (ids []uint64, totalRows uint64)
- func (e *Engine) RedisSearchOne(entity Entity, query *RedisSearchQuery, references ...string) (found bool)
- func (e *Engine) RegisterQueryLogger(handler LogHandler, mysql, redis, local bool)
- func (e *Engine) Search(where *Where, pager *Pager, entities interface{}, references ...string)
- func (e *Engine) SearchIDs(where *Where, pager *Pager, entity Entity) []uint64
- func (e *Engine) SearchIDsWithCount(where *Where, pager *Pager, entity Entity) (results []uint64, totalRows int)
- func (e *Engine) SearchOne(where *Where, entity Entity, references ...string) (found bool)
- func (e *Engine) SearchWithCount(where *Where, pager *Pager, entities interface{}, references ...string) (totalRows int)
- func (e *Engine) SearchWithFakeDeleted(where *Where, pager *Pager, entities interface{}, references ...string)
- func (e *Engine) SetLogMetaData(key string, value interface{})
- func (e *Engine) SetQueryTimeLimit(seconds int)
- type Entity
- type Enum
- type Event
- type EventBroker
- type EventConsumerHandler
- type EventFlusher
- type EventsConsumer
- type ExecResult
- type Flusher
- type ForeignKeyError
- type LoadFields
- type LocalCache
- func (c *LocalCache) Clear()
- func (c *LocalCache) Get(key string) (value interface{}, ok bool)
- func (c *LocalCache) GetObjectsCount() int
- func (c *LocalCache) GetPoolConfig() LocalCachePoolConfig
- func (c *LocalCache) GetSet(key string, ttl time.Duration, provider func() interface{}) interface{}
- func (c *LocalCache) MGet(keys ...string) []interface{}
- func (c *LocalCache) MSet(pairs ...interface{})
- func (c *LocalCache) Remove(keys ...string)
- func (c *LocalCache) Set(key string, value interface{})
- type LocalCachePoolConfig
- type Lock
- type Locker
- type LogHandler
- type LogQueueValue
- type MySQLPoolConfig
- type ORM
- func (orm *ORM) GetDirtyBind() (bind Bind, has bool)
- func (orm *ORM) GetID() uint64
- func (orm *ORM) IsDirty() bool
- func (orm *ORM) IsLoaded() bool
- func (orm *ORM) SetEntityLogMeta(key string, value interface{})
- func (orm *ORM) SetField(field string, value interface{}) error
- func (orm *ORM) SetOnDuplicateKeyUpdate(bind Bind)
- type Pager
- type PipeLineBool
- type PipeLineGet
- type PipeLineInt
- type PipeLineString
- type QueryLoggerSource
- type RedisCache
- func (r *RedisCache) Del(keys ...string)
- func (r *RedisCache) Eval(script string, keys []string, args ...interface{}) interface{}
- func (r *RedisCache) EvalSha(sha1 string, keys []string, args ...interface{}) (res interface{}, exists bool)
- func (r *RedisCache) Exists(keys ...string) int64
- func (r *RedisCache) Expire(key string, expiration time.Duration) bool
- func (r *RedisCache) FlushAll()
- func (r *RedisCache) FlushDB()
- func (r *RedisCache) Get(key string) (value string, has bool)
- func (r *RedisCache) GetLocker() *Locker
- func (r *RedisCache) GetPoolConfig() RedisPoolConfig
- func (r *RedisCache) GetSet(key string, ttlSeconds int, provider func() interface{}) interface{}
- func (r *RedisCache) HDel(key string, fields ...string)
- func (r *RedisCache) HGet(key, field string) (value string, has bool)
- func (r *RedisCache) HGetAll(key string) map[string]string
- func (r *RedisCache) HIncrBy(key, field string, incr int64) int64
- func (r *RedisCache) HLen(key string) int64
- func (r *RedisCache) HMGet(key string, fields ...string) map[string]interface{}
- func (r *RedisCache) HSet(key string, values ...interface{})
- func (r *RedisCache) HSetNx(key, field string, value interface{}) bool
- func (r *RedisCache) Incr(key string) int64
- func (r *RedisCache) IncrBy(key string, incr int64) int64
- func (r *RedisCache) IncrWithExpire(key string, expire time.Duration) int64
- func (r *RedisCache) Info(section ...string) string
- func (r *RedisCache) LLen(key string) int64
- func (r *RedisCache) LPush(key string, values ...interface{}) int64
- func (r *RedisCache) LRange(key string, start, stop int64) []string
- func (r *RedisCache) LRem(key string, count int64, value interface{})
- func (r *RedisCache) LSet(key string, index int64, value interface{})
- func (r *RedisCache) Ltrim(key string, start, stop int64)
- func (r *RedisCache) MGet(keys ...string) []interface{}
- func (r *RedisCache) MSet(pairs ...interface{})
- func (r *RedisCache) PipeLine() *RedisPipeLine
- func (r *RedisCache) RPop(key string) (value string, found bool)
- func (r *RedisCache) RPush(key string, values ...interface{}) int64
- func (r *RedisCache) RateLimit(key string, period time.Duration, limit int) bool
- func (r *RedisCache) SAdd(key string, members ...interface{}) int64
- func (r *RedisCache) SCard(key string) int64
- func (r *RedisCache) SPop(key string) (string, bool)
- func (r *RedisCache) SPopN(key string, max int64) []string
- func (r *RedisCache) ScriptExists(sha1 string) bool
- func (r *RedisCache) ScriptLoad(script string) string
- func (r *RedisCache) Set(key string, value interface{}, ttlSeconds int)
- func (r *RedisCache) SetNX(key string, value interface{}, ttlSeconds int) bool
- func (r *RedisCache) Type(key string) string
- func (r *RedisCache) XAck(stream, group string, ids ...string) int64
- func (r *RedisCache) XClaim(a *redis.XClaimArgs) []redis.XMessage
- func (r *RedisCache) XClaimJustID(a *redis.XClaimArgs) []string
- func (r *RedisCache) XDel(stream string, ids ...string) int64
- func (r *RedisCache) XGroupCreate(stream, group, start string) (key string, exists bool)
- func (r *RedisCache) XGroupCreateMkStream(stream, group, start string) (key string, exists bool)
- func (r *RedisCache) XGroupDelConsumer(stream, group, consumer string) int64
- func (r *RedisCache) XGroupDestroy(stream, group string) int64
- func (r *RedisCache) XInfoGroups(stream string) []redis.XInfoGroup
- func (r *RedisCache) XInfoStream(stream string) *redis.XInfoStream
- func (r *RedisCache) XLen(stream string) int64
- func (r *RedisCache) XPending(stream, group string) *redis.XPending
- func (r *RedisCache) XPendingExt(a *redis.XPendingExtArgs) []redis.XPendingExt
- func (r *RedisCache) XRange(stream, start, stop string, count int64) []redis.XMessage
- func (r *RedisCache) XRead(a *redis.XReadArgs) []redis.XStream
- func (r *RedisCache) XReadGroup(ctx context.Context, a *redis.XReadGroupArgs) (streams []redis.XStream)
- func (r *RedisCache) XRevRange(stream, start, stop string, count int64) []redis.XMessage
- func (r *RedisCache) XTrim(stream string, maxLen int64) (deleted int64)
- func (r *RedisCache) ZAdd(key string, members ...*redis.Z) int64
- func (r *RedisCache) ZCard(key string) int64
- func (r *RedisCache) ZCount(key string, min, max string) int64
- func (r *RedisCache) ZRangeWithScores(key string, start, stop int64) []redis.Z
- func (r *RedisCache) ZRevRange(key string, start, stop int64) []string
- func (r *RedisCache) ZRevRangeWithScores(key string, start, stop int64) []redis.Z
- func (r *RedisCache) ZScore(key, member string) float64
- type RedisPipeLine
- func (rp *RedisPipeLine) Del(key ...string)
- func (rp *RedisPipeLine) Exec()
- func (rp *RedisPipeLine) Expire(key string, expiration time.Duration) *PipeLineBool
- func (rp *RedisPipeLine) Get(key string) *PipeLineGet
- func (rp *RedisPipeLine) HDel(key string, values ...string)
- func (rp *RedisPipeLine) HIncrBy(key, field string, incr int64) *PipeLineInt
- func (rp *RedisPipeLine) HSet(key string, values ...interface{})
- func (rp *RedisPipeLine) Set(key string, value interface{}, expiration time.Duration)
- func (rp *RedisPipeLine) XAdd(stream string, values []string) *PipeLineString
- type RedisPoolConfig
- type RedisSearch
- func (r *RedisSearch) Aggregate(index string, query *RedisSearchAggregate, pager *Pager) (result []map[string]string, totalRows uint64)
- func (r *RedisSearch) ForceReindex(index string)
- func (r *RedisSearch) GetPoolConfig() RedisPoolConfig
- func (r *RedisSearch) Info(indexName string) *RedisSearchIndexInfo
- func (r *RedisSearch) ListIndices() []string
- func (r *RedisSearch) Search(index string, query *RedisSearchQuery, pager *Pager) (total uint64, rows []*RedisSearchResult)
- func (r *RedisSearch) SearchCount(index string, query *RedisSearchQuery) uint64
- func (r *RedisSearch) SearchKeys(index string, query *RedisSearchQuery, pager *Pager) (total uint64, keys []string)
- func (r *RedisSearch) SearchRaw(index string, query *RedisSearchQuery, pager *Pager) (total uint64, rows []interface{})
- type RedisSearchAggregate
- func (a *RedisSearchAggregate) Apply(expression, alias string) *RedisSearchAggregate
- func (a *RedisSearchAggregate) Filter(expression string) *RedisSearchAggregate
- func (a *RedisSearchAggregate) GroupByField(field string, reduce ...AggregateReduce) *RedisSearchAggregate
- func (a *RedisSearchAggregate) GroupByFields(fields []string, reduce ...AggregateReduce) *RedisSearchAggregate
- func (a *RedisSearchAggregate) Load(fields *LoadFields) *RedisSearchAggregate
- func (a *RedisSearchAggregate) LoadAll() *RedisSearchAggregate
- func (a *RedisSearchAggregate) Sort(fields ...RedisSearchAggregateSort) *RedisSearchAggregate
- type RedisSearchAggregateSort
- type RedisSearchIndex
- func (rs *RedisSearchIndex) AddGeoField(name string, sortable, noindex bool)
- func (rs *RedisSearchIndex) AddNumericField(name string, sortable, noindex bool)
- func (rs *RedisSearchIndex) AddTagField(name string, sortable, noindex bool, separator string)
- func (rs *RedisSearchIndex) AddTextField(name string, weight float64, sortable, noindex, nostem bool)
- type RedisSearchIndexAlter
- type RedisSearchIndexField
- type RedisSearchIndexInfo
- type RedisSearchIndexInfoDefinition
- type RedisSearchIndexInfoField
- type RedisSearchIndexInfoOptions
- type RedisSearchIndexPusher
- type RedisSearchIndexerFunc
- type RedisSearchQuery
- func (q *RedisSearchQuery) Aggregate() *RedisSearchAggregate
- func (q *RedisSearchQuery) AppendQueryRaw(query string) *RedisSearchQuery
- func (q *RedisSearchQuery) ExplainScore() *RedisSearchQuery
- func (q *RedisSearchQuery) FilterBool(field string, value bool) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterDate(field string, date time.Time) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterDateGreater(field string, date time.Time) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterDateGreaterEqual(field string, date time.Time) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterDateLess(field string, date time.Time) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterDateLessEqual(field string, date time.Time) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterDateMinMax(field string, min, max time.Time) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterDateNull(field string) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterDateTime(field string, date time.Time) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterDateTimeGreater(field string, date time.Time) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterDateTimeGreaterEqual(field string, date time.Time) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterDateTimeLess(field string, date time.Time) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterDateTimeLessEqual(field string, date time.Time) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterDateTimeMinMax(field string, min, max time.Time) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterDateTimeNull(field string) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterFloat(field string, value ...float64) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterFloatGreater(field string, value float64) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterFloatGreaterEqual(field string, value float64) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterFloatLess(field string, value float64) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterFloatLessEqual(field string, value float64) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterFloatMinMax(field string, min, max float64) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterFloatNull(field string) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterGeo(field string, lon, lat, radius float64, unit string) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterInt(field string, value ...int64) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterIntGreater(field string, value int64) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterIntGreaterEqual(field string, value int64) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterIntLess(field string, value int64) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterIntLessEqual(field string, value int64) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterIntMinMax(field string, min, max int64) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterIntNull(field string) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterManyReferenceIn(field string, id ...uint64) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterManyReferenceNotIn(field string, id ...uint64) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterNotDate(field string, date time.Time) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterNotDateNull(field string) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterNotInt(field string, value ...int64) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterNotIntNull(field string) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterNotString(field string, value ...string) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterNotTag(field string, tag ...string) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterString(field string, value ...string) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterTag(field string, tag ...string) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterUint(field string, value ...uint64) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterUintGreater(field string, value uint64) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterUintGreaterEqual(field string, value uint64) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterUintLess(field string, value uint64) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterUintLessEqual(field string, value uint64) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterUintMinMax(field string, min, max uint64) *RedisSearchQuery
- func (q *RedisSearchQuery) FilterUintNull(field string) *RedisSearchQuery
- func (q *RedisSearchQuery) Highlight(field ...string) *RedisSearchQuery
- func (q *RedisSearchQuery) HighlightTags(openTag, closeTag string) *RedisSearchQuery
- func (q *RedisSearchQuery) InFields(field ...string) *RedisSearchQuery
- func (q *RedisSearchQuery) InKeys(key ...string) *RedisSearchQuery
- func (q *RedisSearchQuery) InOrder() *RedisSearchQuery
- func (q *RedisSearchQuery) Lang(lang string) *RedisSearchQuery
- func (q *RedisSearchQuery) NoStopWords() *RedisSearchQuery
- func (q *RedisSearchQuery) Query(query string) *RedisSearchQuery
- func (q *RedisSearchQuery) QueryField(field string, value ...string) *RedisSearchQuery
- func (q *RedisSearchQuery) QueryFieldPrefixMatch(field string, value ...string) *RedisSearchQuery
- func (q *RedisSearchQuery) QueryRaw(query string) *RedisSearchQuery
- func (q *RedisSearchQuery) Return(field ...string) *RedisSearchQuery
- func (q *RedisSearchQuery) Slop(slop int) *RedisSearchQuery
- func (q *RedisSearchQuery) Sort(field string, desc bool) *RedisSearchQuery
- func (q *RedisSearchQuery) Summarize(field ...string) *RedisSearchQuery
- func (q *RedisSearchQuery) SummarizeOptions(separator string, frags, len int) *RedisSearchQuery
- func (q *RedisSearchQuery) Verbatim() *RedisSearchQuery
- func (q *RedisSearchQuery) WithFakeDeleteRows() *RedisSearchQuery
- func (q *RedisSearchQuery) WithScores() *RedisSearchQuery
- type RedisSearchResult
- type Registry
- func (r *Registry) ForceEntityLogInAllEntities(dbPool string)
- func (r *Registry) InitByYaml(yaml map[string]interface{})
- func (r *Registry) RegisterEntity(entity ...Entity)
- func (r *Registry) RegisterEnum(code string, values []string, defaultValue ...string)
- func (r *Registry) RegisterEnumStruct(code string, val interface{}, defaultValue ...string)
- func (r *Registry) RegisterLocalCache(size int, code ...string)
- func (r *Registry) RegisterMySQLPool(dataSourceName string, code ...string)
- func (r *Registry) RegisterRedis(address, namespace string, db int, code ...string)
- func (r *Registry) RegisterRedisSearchIndex(index ...*RedisSearchIndex)
- func (r *Registry) RegisterRedisSentinel(masterName, namespace string, db int, sentinels []string, code ...string)
- func (r *Registry) RegisterRedisSentinelWithCredentials(masterName, namespace, user, password string, db int, sentinels []string, ...)
- func (r *Registry) RegisterRedisStream(name string, redisPool string, groups []string)
- func (r *Registry) RegisterRedisWithCredentials(address, namespace, user, password string, db int, code ...string)
- func (r *Registry) SetDefaultCollate(collate string)
- func (r *Registry) SetDefaultEncoding(encoding string)
- func (r *Registry) Validate() (validated ValidatedRegistry, deferFunc func(), err error)
- type Rows
- type SQLRow
- type SQLRows
- type TableSchema
- type ValidatedRegistry
- type Where
Constants ¶
View Source
const AsyncConsumerGroupName = "orm-async-consumer"
View Source
const LazyChannelName = "orm-lazy-channel"
View Source
const LogChannelName = "orm-log-channel"
View Source
const RedisSearchIndexerChannelName = "orm-redis-search-channel"
View Source
const RedisSearchNullNumber = -math.MaxInt64
View Source
const RedisStreamGarbageCollectorChannelName = "orm-stream-garbage-collector"
Variables ¶
This section is empty.
Functions ¶
func DisableCacheHashCheck ¶
func DisableCacheHashCheck()
func EscapeRedisSearchString ¶
Types ¶
type AggregateReduce ¶
type AggregateReduce struct {
// contains filtered or unexported fields
}
func NewAggregateReduceAvg ¶
func NewAggregateReduceAvg(property, alias string) AggregateReduce
func NewAggregateReduceCount ¶
func NewAggregateReduceCount(alias string) AggregateReduce
func NewAggregateReduceCountDistinct ¶
func NewAggregateReduceCountDistinct(property, alias string, distinctish bool) AggregateReduce
func NewAggregateReduceFirstValue ¶
func NewAggregateReduceFirstValue(property, alias string) AggregateReduce
func NewAggregateReduceFirstValueBy ¶
func NewAggregateReduceFirstValueBy(property, byProperty, alias string, desc bool) AggregateReduce
func NewAggregateReduceMax ¶
func NewAggregateReduceMax(property, alias string) AggregateReduce
func NewAggregateReduceMin ¶
func NewAggregateReduceMin(property, alias string) AggregateReduce
func NewAggregateReduceQuantile ¶
func NewAggregateReduceQuantile(property, quantile, alias string) AggregateReduce
func NewAggregateReduceRandomSample ¶
func NewAggregateReduceRandomSample(property, alias string, size ...int) AggregateReduce
func NewAggregateReduceStdDev ¶
func NewAggregateReduceStdDev(property, alias string) AggregateReduce
func NewAggregateReduceSum ¶
func NewAggregateReduceSum(property, alias string) AggregateReduce
func NewAggregateReduceToList ¶
func NewAggregateReduceToList(property, alias string) AggregateReduce
type BackgroundConsumer ¶
type BackgroundConsumer struct {
// contains filtered or unexported fields
}
func NewBackgroundConsumer ¶
func NewBackgroundConsumer(engine *Engine) *BackgroundConsumer
func (*BackgroundConsumer) DisableLoop ¶
func (b *BackgroundConsumer) DisableLoop()
func (*BackgroundConsumer) GetLazyFlushEventsSample ¶
func (r *BackgroundConsumer) GetLazyFlushEventsSample(count int64) []string
func (*BackgroundConsumer) SetLazyFlushWorkers ¶
func (r *BackgroundConsumer) SetLazyFlushWorkers(workers int)
type CachedQuery ¶
type CachedQuery struct{}
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) Exec ¶
func (db *DB) Exec(query string, args ...interface{}) ExecResult
func (*DB) GetPoolConfig ¶
func (db *DB) GetPoolConfig() MySQLPoolConfig
func (*DB) IsInTransaction ¶
type DirtyEntityEvent ¶
type DirtyEntityEvent interface { ID() uint64 TableSchema() TableSchema Added() bool Updated() bool Deleted() bool }
func EventDirtyEntity ¶
func EventDirtyEntity(e Event) DirtyEntityEvent
type DuplicatedKeyError ¶
func (*DuplicatedKeyError) Error ¶
func (err *DuplicatedKeyError) Error() string
type Engine ¶
func (*Engine) CachedSearch ¶
func (*Engine) CachedSearchCount ¶
func (*Engine) CachedSearchIDs ¶
func (*Engine) CachedSearchOne ¶
func (*Engine) CachedSearchOneWithReferences ¶
func (*Engine) CachedSearchWithReferences ¶
func (*Engine) ClearCacheByIDs ¶
func (*Engine) DeleteLazy ¶
func (*Engine) DeleteMany ¶
func (*Engine) EnableQueryDebug ¶
func (e *Engine) EnableQueryDebug()
func (*Engine) EnableQueryDebugCustom ¶
func (*Engine) EnableRequestCache ¶
func (e *Engine) EnableRequestCache()
func (*Engine) FlushLazyMany ¶
func (*Engine) FlushWithCheck ¶
func (*Engine) FlushWithFullCheck ¶
func (*Engine) ForceDelete ¶
func (*Engine) ForceDeleteMany ¶
func (*Engine) GetEventBroker ¶
func (e *Engine) GetEventBroker() EventBroker
func (*Engine) GetLocalCache ¶
func (e *Engine) GetLocalCache(code ...string) *LocalCache
func (*Engine) GetRedis ¶
func (e *Engine) GetRedis(code ...string) *RedisCache
func (*Engine) GetRedisSearch ¶
func (e *Engine) GetRedisSearch(code ...string) *RedisSearch
func (*Engine) GetRedisSearchIndexAlters ¶
func (e *Engine) GetRedisSearchIndexAlters() (alters []RedisSearchIndexAlter)
func (*Engine) GetRegistry ¶
func (e *Engine) GetRegistry() ValidatedRegistry
func (*Engine) NewFlusher ¶
func (*Engine) NewRedisSearchIndexPusher ¶
func (e *Engine) NewRedisSearchIndexPusher(pool string) RedisSearchIndexPusher
func (*Engine) RedisSearch ¶
func (e *Engine) RedisSearch(entities interface{}, query *RedisSearchQuery, pager *Pager, references ...string) (totalRows uint64)
func (*Engine) RedisSearchAggregate ¶
func (*Engine) RedisSearchCount ¶
func (e *Engine) RedisSearchCount(entity Entity, query *RedisSearchQuery) (totalRows uint64)
func (*Engine) RedisSearchIds ¶
func (*Engine) RedisSearchOne ¶
func (e *Engine) RedisSearchOne(entity Entity, query *RedisSearchQuery, references ...string) (found bool)
func (*Engine) RegisterQueryLogger ¶
func (e *Engine) RegisterQueryLogger(handler LogHandler, mysql, redis, local bool)
func (*Engine) SearchIDsWithCount ¶
func (*Engine) SearchWithCount ¶
func (*Engine) SearchWithFakeDeleted ¶
func (*Engine) SetLogMetaData ¶
func (*Engine) SetQueryTimeLimit ¶
type EventBroker ¶
type EventBroker interface { Publish(stream string, body interface{}, meta ...string) (id string) Consumer(group string) EventsConsumer NewFlusher() EventFlusher }
type EventConsumerHandler ¶
type EventConsumerHandler func([]Event)
type EventFlusher ¶
type EventsConsumer ¶
type ExecResult ¶
type ForeignKeyError ¶
func (*ForeignKeyError) Error ¶
func (err *ForeignKeyError) Error() string
type LoadFields ¶
type LoadFields struct {
// contains filtered or unexported fields
}
func (*LoadFields) AddField ¶
func (lf *LoadFields) AddField(field string)
func (*LoadFields) AddFieldWithAlias ¶
func (lf *LoadFields) AddFieldWithAlias(field, alias string)
type LocalCache ¶
type LocalCache struct {
// contains filtered or unexported fields
}
func (*LocalCache) Clear ¶
func (c *LocalCache) Clear()
func (*LocalCache) Get ¶
func (c *LocalCache) Get(key string) (value interface{}, ok bool)
func (*LocalCache) GetObjectsCount ¶
func (c *LocalCache) GetObjectsCount() int
func (*LocalCache) GetPoolConfig ¶
func (c *LocalCache) GetPoolConfig() LocalCachePoolConfig
func (*LocalCache) GetSet ¶
func (c *LocalCache) GetSet(key string, ttl time.Duration, provider func() interface{}) interface{}
func (*LocalCache) MGet ¶
func (c *LocalCache) MGet(keys ...string) []interface{}
func (*LocalCache) MSet ¶
func (c *LocalCache) MSet(pairs ...interface{})
func (*LocalCache) Remove ¶
func (c *LocalCache) Remove(keys ...string)
func (*LocalCache) Set ¶
func (c *LocalCache) Set(key string, value interface{})
type LocalCachePoolConfig ¶
type LogHandler ¶
type LogHandler interface {
Handle(log map[string]interface{})
}
type LogQueueValue ¶
type MySQLPoolConfig ¶
type ORM ¶
type ORM struct {
// contains filtered or unexported fields
}
func (*ORM) GetDirtyBind ¶
func (*ORM) SetEntityLogMeta ¶
func (*ORM) SetOnDuplicateKeyUpdate ¶
type Pager ¶
func (*Pager) GetCurrentPage ¶
func (*Pager) GetPageSize ¶
func (*Pager) IncrementPage ¶
func (pager *Pager) IncrementPage()
type PipeLineBool ¶
type PipeLineBool struct {
// contains filtered or unexported fields
}
func (*PipeLineBool) Result ¶
func (c *PipeLineBool) Result() bool
type PipeLineGet ¶
type PipeLineGet struct {
// contains filtered or unexported fields
}
func (*PipeLineGet) Result ¶
func (c *PipeLineGet) Result() (value string, has bool)
type PipeLineInt ¶
type PipeLineInt struct {
// contains filtered or unexported fields
}
func (*PipeLineInt) Result ¶
func (c *PipeLineInt) Result() int64
type PipeLineString ¶
type PipeLineString struct {
// contains filtered or unexported fields
}
func (*PipeLineString) Result ¶
func (c *PipeLineString) Result() string
type QueryLoggerSource ¶
type QueryLoggerSource int
type RedisCache ¶
type RedisCache struct {
// contains filtered or unexported fields
}
func (*RedisCache) Del ¶
func (r *RedisCache) Del(keys ...string)
func (*RedisCache) Eval ¶
func (r *RedisCache) Eval(script string, keys []string, args ...interface{}) interface{}
func (*RedisCache) EvalSha ¶
func (r *RedisCache) EvalSha(sha1 string, keys []string, args ...interface{}) (res interface{}, exists bool)
func (*RedisCache) Exists ¶
func (r *RedisCache) Exists(keys ...string) int64
func (*RedisCache) FlushAll ¶
func (r *RedisCache) FlushAll()
func (*RedisCache) FlushDB ¶
func (r *RedisCache) FlushDB()
func (*RedisCache) GetLocker ¶
func (r *RedisCache) GetLocker() *Locker
func (*RedisCache) GetPoolConfig ¶
func (r *RedisCache) GetPoolConfig() RedisPoolConfig
func (*RedisCache) GetSet ¶
func (r *RedisCache) GetSet(key string, ttlSeconds int, provider func() interface{}) interface{}
func (*RedisCache) HDel ¶
func (r *RedisCache) HDel(key string, fields ...string)
func (*RedisCache) HLen ¶
func (r *RedisCache) HLen(key string) int64
func (*RedisCache) HMGet ¶
func (r *RedisCache) HMGet(key string, fields ...string) map[string]interface{}
func (*RedisCache) HSet ¶
func (r *RedisCache) HSet(key string, values ...interface{})
func (*RedisCache) HSetNx ¶
func (r *RedisCache) HSetNx(key, field string, value interface{}) bool
func (*RedisCache) Incr ¶
func (r *RedisCache) Incr(key string) int64
func (*RedisCache) IncrWithExpire ¶
func (r *RedisCache) IncrWithExpire(key string, expire time.Duration) int64
func (*RedisCache) Info ¶
func (r *RedisCache) Info(section ...string) string
func (*RedisCache) LLen ¶
func (r *RedisCache) LLen(key string) int64
func (*RedisCache) LPush ¶
func (r *RedisCache) LPush(key string, values ...interface{}) int64
func (*RedisCache) LRem ¶
func (r *RedisCache) LRem(key string, count int64, value interface{})
func (*RedisCache) LSet ¶
func (r *RedisCache) LSet(key string, index int64, value interface{})
func (*RedisCache) Ltrim ¶
func (r *RedisCache) Ltrim(key string, start, stop int64)
func (*RedisCache) MGet ¶
func (r *RedisCache) MGet(keys ...string) []interface{}
func (*RedisCache) MSet ¶
func (r *RedisCache) MSet(pairs ...interface{})
func (*RedisCache) PipeLine ¶
func (r *RedisCache) PipeLine() *RedisPipeLine
func (*RedisCache) RPush ¶
func (r *RedisCache) RPush(key string, values ...interface{}) int64
func (*RedisCache) SAdd ¶
func (r *RedisCache) SAdd(key string, members ...interface{}) int64
func (*RedisCache) SCard ¶
func (r *RedisCache) SCard(key string) int64
func (*RedisCache) ScriptExists ¶
func (r *RedisCache) ScriptExists(sha1 string) bool
func (*RedisCache) ScriptLoad ¶
func (r *RedisCache) ScriptLoad(script string) string
func (*RedisCache) Set ¶
func (r *RedisCache) Set(key string, value interface{}, ttlSeconds int)
func (*RedisCache) SetNX ¶
func (r *RedisCache) SetNX(key string, value interface{}, ttlSeconds int) bool
func (*RedisCache) Type ¶
func (r *RedisCache) Type(key string) string
func (*RedisCache) XClaim ¶
func (r *RedisCache) XClaim(a *redis.XClaimArgs) []redis.XMessage
func (*RedisCache) XClaimJustID ¶
func (r *RedisCache) XClaimJustID(a *redis.XClaimArgs) []string
func (*RedisCache) XGroupCreate ¶
func (r *RedisCache) XGroupCreate(stream, group, start string) (key string, exists bool)
func (*RedisCache) XGroupCreateMkStream ¶
func (r *RedisCache) XGroupCreateMkStream(stream, group, start string) (key string, exists bool)
func (*RedisCache) XGroupDelConsumer ¶
func (r *RedisCache) XGroupDelConsumer(stream, group, consumer string) int64
func (*RedisCache) XGroupDestroy ¶
func (r *RedisCache) XGroupDestroy(stream, group string) int64
func (*RedisCache) XInfoGroups ¶
func (r *RedisCache) XInfoGroups(stream string) []redis.XInfoGroup
func (*RedisCache) XInfoStream ¶
func (r *RedisCache) XInfoStream(stream string) *redis.XInfoStream
func (*RedisCache) XLen ¶
func (r *RedisCache) XLen(stream string) int64
func (*RedisCache) XPending ¶
func (r *RedisCache) XPending(stream, group string) *redis.XPending
func (*RedisCache) XPendingExt ¶
func (r *RedisCache) XPendingExt(a *redis.XPendingExtArgs) []redis.XPendingExt
func (*RedisCache) XRange ¶
func (r *RedisCache) XRange(stream, start, stop string, count int64) []redis.XMessage
func (*RedisCache) XRead ¶
func (r *RedisCache) XRead(a *redis.XReadArgs) []redis.XStream
func (*RedisCache) XReadGroup ¶
func (r *RedisCache) XReadGroup(ctx context.Context, a *redis.XReadGroupArgs) (streams []redis.XStream)
func (*RedisCache) XRevRange ¶
func (r *RedisCache) XRevRange(stream, start, stop string, count int64) []redis.XMessage
func (*RedisCache) ZAdd ¶
func (r *RedisCache) ZAdd(key string, members ...*redis.Z) int64
func (*RedisCache) ZCard ¶
func (r *RedisCache) ZCard(key string) int64
func (*RedisCache) ZRangeWithScores ¶
func (r *RedisCache) ZRangeWithScores(key string, start, stop int64) []redis.Z
func (*RedisCache) ZRevRange ¶
func (r *RedisCache) ZRevRange(key string, start, stop int64) []string
func (*RedisCache) ZRevRangeWithScores ¶
func (r *RedisCache) ZRevRangeWithScores(key string, start, stop int64) []redis.Z
func (*RedisCache) ZScore ¶
func (r *RedisCache) ZScore(key, member string) float64
type RedisPipeLine ¶
type RedisPipeLine struct {
// contains filtered or unexported fields
}
func (*RedisPipeLine) Del ¶
func (rp *RedisPipeLine) Del(key ...string)
func (*RedisPipeLine) Exec ¶
func (rp *RedisPipeLine) Exec()
func (*RedisPipeLine) Expire ¶
func (rp *RedisPipeLine) Expire(key string, expiration time.Duration) *PipeLineBool
func (*RedisPipeLine) Get ¶
func (rp *RedisPipeLine) Get(key string) *PipeLineGet
func (*RedisPipeLine) HDel ¶
func (rp *RedisPipeLine) HDel(key string, values ...string)
func (*RedisPipeLine) HIncrBy ¶
func (rp *RedisPipeLine) HIncrBy(key, field string, incr int64) *PipeLineInt
func (*RedisPipeLine) HSet ¶
func (rp *RedisPipeLine) HSet(key string, values ...interface{})
func (*RedisPipeLine) Set ¶
func (rp *RedisPipeLine) Set(key string, value interface{}, expiration time.Duration)
func (*RedisPipeLine) XAdd ¶
func (rp *RedisPipeLine) XAdd(stream string, values []string) *PipeLineString
type RedisPoolConfig ¶
type RedisSearch ¶
type RedisSearch struct {
// contains filtered or unexported fields
}
func (*RedisSearch) Aggregate ¶
func (r *RedisSearch) Aggregate(index string, query *RedisSearchAggregate, pager *Pager) (result []map[string]string, totalRows uint64)
func (*RedisSearch) ForceReindex ¶
func (r *RedisSearch) ForceReindex(index string)
func (*RedisSearch) GetPoolConfig ¶
func (r *RedisSearch) GetPoolConfig() RedisPoolConfig
func (*RedisSearch) Info ¶
func (r *RedisSearch) Info(indexName string) *RedisSearchIndexInfo
func (*RedisSearch) ListIndices ¶
func (r *RedisSearch) ListIndices() []string
func (*RedisSearch) Search ¶
func (r *RedisSearch) Search(index string, query *RedisSearchQuery, pager *Pager) (total uint64, rows []*RedisSearchResult)
func (*RedisSearch) SearchCount ¶
func (r *RedisSearch) SearchCount(index string, query *RedisSearchQuery) uint64
func (*RedisSearch) SearchKeys ¶
func (r *RedisSearch) SearchKeys(index string, query *RedisSearchQuery, pager *Pager) (total uint64, keys []string)
func (*RedisSearch) SearchRaw ¶
func (r *RedisSearch) SearchRaw(index string, query *RedisSearchQuery, pager *Pager) (total uint64, rows []interface{})
type RedisSearchAggregate ¶
type RedisSearchAggregate struct {
// contains filtered or unexported fields
}
func (*RedisSearchAggregate) Apply ¶
func (a *RedisSearchAggregate) Apply(expression, alias string) *RedisSearchAggregate
func (*RedisSearchAggregate) Filter ¶
func (a *RedisSearchAggregate) Filter(expression string) *RedisSearchAggregate
func (*RedisSearchAggregate) GroupByField ¶
func (a *RedisSearchAggregate) GroupByField(field string, reduce ...AggregateReduce) *RedisSearchAggregate
func (*RedisSearchAggregate) GroupByFields ¶
func (a *RedisSearchAggregate) GroupByFields(fields []string, reduce ...AggregateReduce) *RedisSearchAggregate
func (*RedisSearchAggregate) Load ¶
func (a *RedisSearchAggregate) Load(fields *LoadFields) *RedisSearchAggregate
func (*RedisSearchAggregate) LoadAll ¶
func (a *RedisSearchAggregate) LoadAll() *RedisSearchAggregate
func (*RedisSearchAggregate) Sort ¶
func (a *RedisSearchAggregate) Sort(fields ...RedisSearchAggregateSort) *RedisSearchAggregate
type RedisSearchIndex ¶
type RedisSearchIndex struct { Name string RedisPool string Prefixes []string DefaultLanguage string LanguageField string DefaultScore float64 ScoreField string MaxTextFields bool NoOffsets bool NoNHL bool NoFields bool NoFreqs bool SkipInitialScan bool StopWords []string Fields []RedisSearchIndexField Indexer RedisSearchIndexerFunc `json:"-"` }
func NewRedisSearchIndex ¶
func NewRedisSearchIndex(name, pool string, prefixes []string) *RedisSearchIndex
func (*RedisSearchIndex) AddGeoField ¶
func (rs *RedisSearchIndex) AddGeoField(name string, sortable, noindex bool)
func (*RedisSearchIndex) AddNumericField ¶
func (rs *RedisSearchIndex) AddNumericField(name string, sortable, noindex bool)
func (*RedisSearchIndex) AddTagField ¶
func (rs *RedisSearchIndex) AddTagField(name string, sortable, noindex bool, separator string)
func (*RedisSearchIndex) AddTextField ¶
func (rs *RedisSearchIndex) AddTextField(name string, weight float64, sortable, noindex, nostem bool)
type RedisSearchIndexAlter ¶
type RedisSearchIndexField ¶
type RedisSearchIndexInfo ¶
type RedisSearchIndexInfo struct { Name string Options RedisSearchIndexInfoOptions Definition RedisSearchIndexInfoDefinition Fields []RedisSearchIndexInfoField NumDocs uint64 MaxDocID uint64 NumTerms uint64 NumRecords uint64 InvertedSzMB float64 TotalInvertedIndexBlocks float64 OffsetVectorsSzMB float64 DocTableSizeMB float64 SortableValuesSizeMB float64 KeyTableSizeMB float64 RecordsPerDocAvg int BytesPerRecordAvg int OffsetsPerTermAvg float64 OffsetBitsPerRecordAvg float64 HashIndexingFailures uint64 Indexing bool PercentIndexed float64 StopWords []string }
type RedisSearchIndexPusher ¶
type RedisSearchIndexPusher interface { NewDocument(key string) DeleteDocuments(key ...string) SetString(key string, value string) SetTag(key string, tag ...string) SetUint(key string, value uint64) SetInt(key string, value int64) SetIntNil(key string) SetFloat(key string, value float64) SetBool(key string, value bool) SetGeo(key string, lon float64, lat float64) PushDocument() Flush() // contains filtered or unexported methods }
type RedisSearchIndexerFunc ¶
type RedisSearchIndexerFunc func(engine *Engine, lastID uint64, pusher RedisSearchIndexPusher) (newID uint64, hasMore bool)
type RedisSearchQuery ¶
type RedisSearchQuery struct {
// contains filtered or unexported fields
}
func NewRedisSearchQuery ¶
func NewRedisSearchQuery() *RedisSearchQuery
func (*RedisSearchQuery) Aggregate ¶
func (q *RedisSearchQuery) Aggregate() *RedisSearchAggregate
func (*RedisSearchQuery) AppendQueryRaw ¶
func (q *RedisSearchQuery) AppendQueryRaw(query string) *RedisSearchQuery
func (*RedisSearchQuery) ExplainScore ¶
func (q *RedisSearchQuery) ExplainScore() *RedisSearchQuery
func (*RedisSearchQuery) FilterBool ¶
func (q *RedisSearchQuery) FilterBool(field string, value bool) *RedisSearchQuery
func (*RedisSearchQuery) FilterDate ¶
func (q *RedisSearchQuery) FilterDate(field string, date time.Time) *RedisSearchQuery
func (*RedisSearchQuery) FilterDateGreater ¶
func (q *RedisSearchQuery) FilterDateGreater(field string, date time.Time) *RedisSearchQuery
func (*RedisSearchQuery) FilterDateGreaterEqual ¶
func (q *RedisSearchQuery) FilterDateGreaterEqual(field string, date time.Time) *RedisSearchQuery
func (*RedisSearchQuery) FilterDateLess ¶
func (q *RedisSearchQuery) FilterDateLess(field string, date time.Time) *RedisSearchQuery
func (*RedisSearchQuery) FilterDateLessEqual ¶
func (q *RedisSearchQuery) FilterDateLessEqual(field string, date time.Time) *RedisSearchQuery
func (*RedisSearchQuery) FilterDateMinMax ¶
func (q *RedisSearchQuery) FilterDateMinMax(field string, min, max time.Time) *RedisSearchQuery
func (*RedisSearchQuery) FilterDateNull ¶
func (q *RedisSearchQuery) FilterDateNull(field string) *RedisSearchQuery
func (*RedisSearchQuery) FilterDateTime ¶
func (q *RedisSearchQuery) FilterDateTime(field string, date time.Time) *RedisSearchQuery
func (*RedisSearchQuery) FilterDateTimeGreater ¶
func (q *RedisSearchQuery) FilterDateTimeGreater(field string, date time.Time) *RedisSearchQuery
func (*RedisSearchQuery) FilterDateTimeGreaterEqual ¶
func (q *RedisSearchQuery) FilterDateTimeGreaterEqual(field string, date time.Time) *RedisSearchQuery
func (*RedisSearchQuery) FilterDateTimeLess ¶
func (q *RedisSearchQuery) FilterDateTimeLess(field string, date time.Time) *RedisSearchQuery
func (*RedisSearchQuery) FilterDateTimeLessEqual ¶
func (q *RedisSearchQuery) FilterDateTimeLessEqual(field string, date time.Time) *RedisSearchQuery
func (*RedisSearchQuery) FilterDateTimeMinMax ¶
func (q *RedisSearchQuery) FilterDateTimeMinMax(field string, min, max time.Time) *RedisSearchQuery
func (*RedisSearchQuery) FilterDateTimeNull ¶
func (q *RedisSearchQuery) FilterDateTimeNull(field string) *RedisSearchQuery
func (*RedisSearchQuery) FilterFloat ¶
func (q *RedisSearchQuery) FilterFloat(field string, value ...float64) *RedisSearchQuery
func (*RedisSearchQuery) FilterFloatGreater ¶
func (q *RedisSearchQuery) FilterFloatGreater(field string, value float64) *RedisSearchQuery
func (*RedisSearchQuery) FilterFloatGreaterEqual ¶
func (q *RedisSearchQuery) FilterFloatGreaterEqual(field string, value float64) *RedisSearchQuery
func (*RedisSearchQuery) FilterFloatLess ¶
func (q *RedisSearchQuery) FilterFloatLess(field string, value float64) *RedisSearchQuery
func (*RedisSearchQuery) FilterFloatLessEqual ¶
func (q *RedisSearchQuery) FilterFloatLessEqual(field string, value float64) *RedisSearchQuery
func (*RedisSearchQuery) FilterFloatMinMax ¶
func (q *RedisSearchQuery) FilterFloatMinMax(field string, min, max float64) *RedisSearchQuery
func (*RedisSearchQuery) FilterFloatNull ¶
func (q *RedisSearchQuery) FilterFloatNull(field string) *RedisSearchQuery
func (*RedisSearchQuery) FilterGeo ¶
func (q *RedisSearchQuery) FilterGeo(field string, lon, lat, radius float64, unit string) *RedisSearchQuery
func (*RedisSearchQuery) FilterInt ¶
func (q *RedisSearchQuery) FilterInt(field string, value ...int64) *RedisSearchQuery
func (*RedisSearchQuery) FilterIntGreater ¶
func (q *RedisSearchQuery) FilterIntGreater(field string, value int64) *RedisSearchQuery
func (*RedisSearchQuery) FilterIntGreaterEqual ¶
func (q *RedisSearchQuery) FilterIntGreaterEqual(field string, value int64) *RedisSearchQuery
func (*RedisSearchQuery) FilterIntLess ¶
func (q *RedisSearchQuery) FilterIntLess(field string, value int64) *RedisSearchQuery
func (*RedisSearchQuery) FilterIntLessEqual ¶
func (q *RedisSearchQuery) FilterIntLessEqual(field string, value int64) *RedisSearchQuery
func (*RedisSearchQuery) FilterIntMinMax ¶
func (q *RedisSearchQuery) FilterIntMinMax(field string, min, max int64) *RedisSearchQuery
func (*RedisSearchQuery) FilterIntNull ¶
func (q *RedisSearchQuery) FilterIntNull(field string) *RedisSearchQuery
func (*RedisSearchQuery) FilterManyReferenceIn ¶
func (q *RedisSearchQuery) FilterManyReferenceIn(field string, id ...uint64) *RedisSearchQuery
func (*RedisSearchQuery) FilterManyReferenceNotIn ¶
func (q *RedisSearchQuery) FilterManyReferenceNotIn(field string, id ...uint64) *RedisSearchQuery
func (*RedisSearchQuery) FilterNotDate ¶
func (q *RedisSearchQuery) FilterNotDate(field string, date time.Time) *RedisSearchQuery
func (*RedisSearchQuery) FilterNotDateNull ¶
func (q *RedisSearchQuery) FilterNotDateNull(field string) *RedisSearchQuery
func (*RedisSearchQuery) FilterNotInt ¶
func (q *RedisSearchQuery) FilterNotInt(field string, value ...int64) *RedisSearchQuery
func (*RedisSearchQuery) FilterNotIntNull ¶
func (q *RedisSearchQuery) FilterNotIntNull(field string) *RedisSearchQuery
func (*RedisSearchQuery) FilterNotString ¶
func (q *RedisSearchQuery) FilterNotString(field string, value ...string) *RedisSearchQuery
func (*RedisSearchQuery) FilterNotTag ¶
func (q *RedisSearchQuery) FilterNotTag(field string, tag ...string) *RedisSearchQuery
func (*RedisSearchQuery) FilterString ¶
func (q *RedisSearchQuery) FilterString(field string, value ...string) *RedisSearchQuery
func (*RedisSearchQuery) FilterTag ¶
func (q *RedisSearchQuery) FilterTag(field string, tag ...string) *RedisSearchQuery
func (*RedisSearchQuery) FilterUint ¶
func (q *RedisSearchQuery) FilterUint(field string, value ...uint64) *RedisSearchQuery
func (*RedisSearchQuery) FilterUintGreater ¶
func (q *RedisSearchQuery) FilterUintGreater(field string, value uint64) *RedisSearchQuery
func (*RedisSearchQuery) FilterUintGreaterEqual ¶
func (q *RedisSearchQuery) FilterUintGreaterEqual(field string, value uint64) *RedisSearchQuery
func (*RedisSearchQuery) FilterUintLess ¶
func (q *RedisSearchQuery) FilterUintLess(field string, value uint64) *RedisSearchQuery
func (*RedisSearchQuery) FilterUintLessEqual ¶
func (q *RedisSearchQuery) FilterUintLessEqual(field string, value uint64) *RedisSearchQuery
func (*RedisSearchQuery) FilterUintMinMax ¶
func (q *RedisSearchQuery) FilterUintMinMax(field string, min, max uint64) *RedisSearchQuery
func (*RedisSearchQuery) FilterUintNull ¶
func (q *RedisSearchQuery) FilterUintNull(field string) *RedisSearchQuery
func (*RedisSearchQuery) Highlight ¶
func (q *RedisSearchQuery) Highlight(field ...string) *RedisSearchQuery
func (*RedisSearchQuery) HighlightTags ¶
func (q *RedisSearchQuery) HighlightTags(openTag, closeTag string) *RedisSearchQuery
func (*RedisSearchQuery) InFields ¶
func (q *RedisSearchQuery) InFields(field ...string) *RedisSearchQuery
func (*RedisSearchQuery) InKeys ¶
func (q *RedisSearchQuery) InKeys(key ...string) *RedisSearchQuery
func (*RedisSearchQuery) InOrder ¶
func (q *RedisSearchQuery) InOrder() *RedisSearchQuery
func (*RedisSearchQuery) Lang ¶
func (q *RedisSearchQuery) Lang(lang string) *RedisSearchQuery
func (*RedisSearchQuery) NoStopWords ¶
func (q *RedisSearchQuery) NoStopWords() *RedisSearchQuery
func (*RedisSearchQuery) Query ¶
func (q *RedisSearchQuery) Query(query string) *RedisSearchQuery
func (*RedisSearchQuery) QueryField ¶
func (q *RedisSearchQuery) QueryField(field string, value ...string) *RedisSearchQuery
func (*RedisSearchQuery) QueryFieldPrefixMatch ¶
func (q *RedisSearchQuery) QueryFieldPrefixMatch(field string, value ...string) *RedisSearchQuery
func (*RedisSearchQuery) QueryRaw ¶
func (q *RedisSearchQuery) QueryRaw(query string) *RedisSearchQuery
func (*RedisSearchQuery) Return ¶
func (q *RedisSearchQuery) Return(field ...string) *RedisSearchQuery
func (*RedisSearchQuery) Slop ¶
func (q *RedisSearchQuery) Slop(slop int) *RedisSearchQuery
func (*RedisSearchQuery) Sort ¶
func (q *RedisSearchQuery) Sort(field string, desc bool) *RedisSearchQuery
func (*RedisSearchQuery) Summarize ¶
func (q *RedisSearchQuery) Summarize(field ...string) *RedisSearchQuery
func (*RedisSearchQuery) SummarizeOptions ¶
func (q *RedisSearchQuery) SummarizeOptions(separator string, frags, len int) *RedisSearchQuery
func (*RedisSearchQuery) Verbatim ¶
func (q *RedisSearchQuery) Verbatim() *RedisSearchQuery
func (*RedisSearchQuery) WithFakeDeleteRows ¶
func (q *RedisSearchQuery) WithFakeDeleteRows() *RedisSearchQuery
func (*RedisSearchQuery) WithScores ¶
func (q *RedisSearchQuery) WithScores() *RedisSearchQuery
type RedisSearchResult ¶
type RedisSearchResult struct { Key string Fields []interface{} Score float64 ExplainScore []interface{} }
func (*RedisSearchResult) Value ¶
func (r *RedisSearchResult) Value(field string) interface{}
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry() *Registry
func (*Registry) ForceEntityLogInAllEntities ¶
func (*Registry) InitByYaml ¶
func (*Registry) RegisterEntity ¶
func (*Registry) RegisterEnum ¶
func (*Registry) RegisterEnumStruct ¶
func (*Registry) RegisterLocalCache ¶
func (*Registry) RegisterMySQLPool ¶
func (*Registry) RegisterRedis ¶
func (*Registry) RegisterRedisSearchIndex ¶
func (r *Registry) RegisterRedisSearchIndex(index ...*RedisSearchIndex)
func (*Registry) RegisterRedisSentinel ¶
func (*Registry) RegisterRedisSentinelWithCredentials ¶
func (*Registry) RegisterRedisStream ¶
func (*Registry) RegisterRedisWithCredentials ¶
func (*Registry) SetDefaultCollate ¶
func (*Registry) SetDefaultEncoding ¶
func (*Registry) Validate ¶
func (r *Registry) Validate() (validated ValidatedRegistry, deferFunc func(), err error)
type TableSchema ¶
type TableSchema interface { GetTableName() string GetType() reflect.Type NewEntity() Entity DropTable(engine *Engine) TruncateTable(engine *Engine) UpdateSchema(engine *Engine) ReindexRedisSearchIndex(engine *Engine) UpdateSchemaAndTruncateTable(engine *Engine) GetMysql(engine *Engine) *DB GetLocalCache(engine *Engine) (cache *LocalCache, has bool) GetRedisCache(engine *Engine) (cache *RedisCache, has bool) GetRedisSearch(engine *Engine) (search *RedisSearch, has bool) GetReferences() []string GetColumns() []string GetUniqueIndexes() map[string][]string GetSchemaChanges(engine *Engine) (has bool, alters []Alter) GetUsage(registry ValidatedRegistry) map[reflect.Type][]string }
type ValidatedRegistry ¶
type ValidatedRegistry interface { CreateEngine() *Engine GetTableSchema(entityName string) TableSchema GetTableSchemaForEntity(entity Entity) TableSchema GetTableSchemaForCachePrefix(cachePrefix string) TableSchema GetSourceRegistry() *Registry GetEnum(code string) Enum GetRedisStreams() map[string]map[string][]string GetMySQLPools() map[string]MySQLPoolConfig GetLocalCachePools() map[string]LocalCachePoolConfig GetRedisPools() map[string]RedisPoolConfig GetRedisSearchIndices() map[string][]*RedisSearchIndex GetEntities() map[string]reflect.Type }
type Where ¶
type Where struct {
// contains filtered or unexported fields
}
func (*Where) GetParameters ¶
func (where *Where) GetParameters() []interface{}
func (*Where) SetParameter ¶
func (*Where) SetParameters ¶
Source Files ¶
- background_consumer.go
- bind_builder.go
- cached_search.go
- clear_by_ids.go
- db.go
- dirty_event.go
- engine.go
- entity_redis_search.go
- event_broker.go
- flusher.go
- load_by_id.go
- load_by_ids.go
- local_cache.go
- locker.go
- orm.go
- pager.go
- query_logger.go
- redis_cache.go
- redis_flusher.go
- redis_pipeline.go
- redis_search.go
- redis_search_indexer.go
- registry.go
- schema.go
- search.go
- serializer.go
- table_schema.go
- uuid.go
- validated_registry.go
- where.go
- yaml_loader.go
Click to show internal directories.
Click to hide internal directories.