Documentation ¶
Index ¶
- Constants
- func KeyGt(key string) string
- func KeyGte(key string) string
- func KeyLt(key string) string
- func KeyLte(key string) string
- func KeyWhere(key string) string
- type IRelationExpired
- type Member
- type Option
- type RelationMapping
- func (r *RelationMapping) Exist(unknownValue string, model interface{}, unknownField string, ...) (bool, error)
- func (r *RelationMapping) Key(model interface{}, unknownField string, knownMap map[string]interface{}, ...) (string, error)
- func (r *RelationMapping) List(results interface{}, start int64, stop int64, model interface{}, ...) error
- func (r *RelationMapping) ListByScore(results interface{}, by *redis.ZRangeBy, model interface{}, ...) error
- func (r *RelationMapping) ListByScoreWithZ(results interface{}, by *redis.ZRangeBy, model interface{}, ...) ([]redis.Z, error)
- type Score
Constants ¶
View Source
const MagicKey = "$"
View Source
const (
RecordNotFoundPlaceholder float64 = -404.404 // 数据库为空的占位符
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IRelationExpired ¶
type IRelationExpired interface {
RelationExpiredSecond() int
}
type RelationMapping ¶
type RelationMapping struct {
// contains filtered or unexported fields
}
func NewRelationMapping ¶
func NewRelationMapping(tx *gorm.DB, rc redis.UniversalClient) *RelationMapping
func (*RelationMapping) Key ¶
func (r *RelationMapping) Key( model interface{}, unknownField string, knownMap map[string]interface{}, options ...Option, ) (string, error)
Key k = $(zset:relation:$tableName:zsize:$size:sortby:$order:$key1:$value1:$key2:$value2:unknownField:$unknownField).trim() k = $(z:r:$tableName:zs:$size:sb:$order:$key1:$value1:$key2:$value2:uf:$unknownField).trim() v =
func (*RelationMapping) ListByScore ¶
func (r *RelationMapping) ListByScore( results interface{}, by *redis.ZRangeBy, model interface{}, unknownField string, knownMap map[string]interface{}, options ...Option, ) error
func (*RelationMapping) ListByScoreWithZ ¶
func (r *RelationMapping) ListByScoreWithZ( results interface{}, by *redis.ZRangeBy, model interface{}, unknownField string, knownMap map[string]interface{}, options ...Option, ) ([]redis.Z, error)
返回 []redis.Z
Click to show internal directories.
Click to hide internal directories.