Documentation
¶
Index ¶
- type DocIndexConfigRow
- type DocIndexRow
- type DocRow
- type KeyRow
- type Store
- func (s *Store) CleanupExpired(ctx context.Context, limit int) (int64, error)
- func (s *Store) Close() error
- func (s *Store) ConfigureIndexes(ctx context.Context, db int, collection string, cfg docstore.IndexConfig) (docstore.IndexConfig, error)
- func (s *Store) Delete(ctx context.Context, db int, keys ...string) (int64, error)
- func (s *Store) DeleteDoc(ctx context.Context, db int, collection, id string) (bool, error)
- func (s *Store) Exists(ctx context.Context, db int, keys ...string) (int64, error)
- func (s *Store) Expire(ctx context.Context, db int, key string, ttl time.Duration) (bool, error)
- func (s *Store) Get(ctx context.Context, db int, key string) (*store.Value, error)
- func (s *Store) GetDel(ctx context.Context, db int, key string) (*store.Value, bool, error)
- func (s *Store) GetDoc(ctx context.Context, db int, collection, id string) (docstore.Document, error)
- func (s *Store) GetIndexConfig(ctx context.Context, db int, collection string) (docstore.IndexConfig, error)
- func (s *Store) IncrBy(ctx context.Context, db int, key string, delta int64) (int64, error)
- func (s *Store) MGet(ctx context.Context, db int, keys ...string) ([]*store.Value, error)
- func (s *Store) MSet(ctx context.Context, db int, pairs []store.KeyValue, opts store.SetOptions) error
- func (s *Store) Migrate(ctx context.Context) error
- func (s *Store) MigrateDocs(ctx context.Context) error
- func (s *Store) Persist(ctx context.Context, db int, key string) (bool, error)
- func (s *Store) Ping(ctx context.Context) error
- func (s *Store) PutDoc(ctx context.Context, db int, collection, id string, value []byte, ...) (docstore.Document, bool, error)
- func (s *Store) QueryDocs(ctx context.Context, db int, collection string, opts docstore.QueryOptions) (docstore.QueryResult, error)
- func (s *Store) Scan(ctx context.Context, db int, cursor string, pattern string, count int) (store.ScanResult, error)
- func (s *Store) Set(ctx context.Context, db int, key string, value []byte, opts store.SetOptions) (*store.Value, bool, error)
- func (s *Store) Stats(ctx context.Context, db int) (store.Stats, error)
- func (s *Store) TTL(ctx context.Context, db int, key string) (time.Duration, bool, bool, error)
- func (s *Store) Type(ctx context.Context, db int, key string) (string, error)
- func (s *Store) ZAdd(ctx context.Context, db int, key string, score float64, member []byte) (int64, error)
- func (s *Store) ZCard(ctx context.Context, db int, key string) (int64, error)
- func (s *Store) ZCount(ctx context.Context, db int, key string, min, max store.ScoreBound) (int64, error)
- func (s *Store) ZRange(ctx context.Context, db int, key string, start, stop int64) ([]store.ZMember, error)
- func (s *Store) ZRangeByScore(ctx context.Context, db int, key string, min, max store.ScoreBound, ...) ([]store.ZMember, error)
- func (s *Store) ZRem(ctx context.Context, db int, key string, members ...[]byte) (int64, error)
- func (s *Store) ZRemRangeByScore(ctx context.Context, db int, key string, min, max store.ScoreBound) (int64, error)
- func (s *Store) ZScore(ctx context.Context, db int, key string, member []byte) (float64, bool, error)
- type ZSetMemberRow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DocIndexConfigRow ¶
type DocIndexConfigRow struct {
DB int `gorm:"column:db;primaryKey;autoIncrement:false"`
Collection string `gorm:"column:collection;primaryKey;size:191"`
Kind string `gorm:"column:kind;primaryKey;size:32"`
Field string `gorm:"column:field;primaryKey;size:191"`
CreatedAt time.Time `gorm:"column:created_at;autoCreateTime"`
}
func (DocIndexConfigRow) TableName ¶
func (DocIndexConfigRow) TableName() string
type DocIndexRow ¶
type DocIndexRow struct {
DB int `gorm:"column:db;primaryKey;autoIncrement:false"`
Collection string `gorm:"column:collection;primaryKey;size:191;index:idx_redge_doc_indexes_lookup,priority:1"`
Field string `gorm:"column:field;primaryKey;size:191;index:idx_redge_doc_indexes_lookup,priority:2"`
ValueHash string `gorm:"column:value_hash;primaryKey;size:64;index:idx_redge_doc_indexes_lookup,priority:3"`
ID string `gorm:"column:id;primaryKey;size:191;index:idx_redge_doc_indexes_lookup,priority:4"`
DisplayText string `gorm:"column:display_text;type:text"`
CreatedAt time.Time `gorm:"column:created_at;autoCreateTime"`
}
func (DocIndexRow) TableName ¶
func (DocIndexRow) TableName() string
type DocRow ¶
type DocRow struct {
DB int `gorm:"column:db;primaryKey;autoIncrement:false"`
Collection string `gorm:"column:collection;primaryKey;size:191;index:idx_redge_docs_collection_id,priority:1"`
ID string `gorm:"column:id;primaryKey;size:191;index:idx_redge_docs_collection_id,priority:2"`
Value []byte `gorm:"column:value;not null"`
SearchText string `gorm:"column:search_text;type:text"`
ExpiresAt *time.Time `gorm:"column:expires_at;index"`
Version int64 `gorm:"column:version;not null;default:1"`
CreatedAt time.Time `gorm:"column:created_at;autoCreateTime"`
UpdatedAt time.Time `gorm:"column:updated_at;autoUpdateTime"`
}
type KeyRow ¶
type KeyRow struct {
DB int `gorm:"column:db;primaryKey;autoIncrement:false"`
Key string `gorm:"column:key;primaryKey;size:512"`
Type string `gorm:"column:type;not null;size:32;index"`
StringValue []byte `gorm:"column:string_value"`
ExpiresAt *time.Time `gorm:"column:expires_at;index"`
Version int64 `gorm:"column:version;not null;default:1"`
CreatedAt time.Time `gorm:"column:created_at;autoCreateTime"`
UpdatedAt time.Time `gorm:"column:updated_at;autoUpdateTime"`
}
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) CleanupExpired ¶
func (*Store) ConfigureIndexes ¶
func (s *Store) ConfigureIndexes(ctx context.Context, db int, collection string, cfg docstore.IndexConfig) (docstore.IndexConfig, error)
func (*Store) GetIndexConfig ¶
func (*Store) QueryDocs ¶
func (s *Store) QueryDocs(ctx context.Context, db int, collection string, opts docstore.QueryOptions) (docstore.QueryResult, error)
func (*Store) ZRangeByScore ¶
func (*Store) ZRemRangeByScore ¶
type ZSetMemberRow ¶
type ZSetMemberRow struct {
DB int `gorm:"column:db;primaryKey;autoIncrement:false"`
Key string `gorm:"column:key;primaryKey;size:512;index:idx_redge_zset_score,priority:1"`
MemberHash string `gorm:"column:member_hash;primaryKey;size:64"`
Member []byte `gorm:"column:member;not null"`
Score float64 `gorm:"column:score;not null;index:idx_redge_zset_score,priority:2"`
CreatedAt time.Time `gorm:"column:created_at;autoCreateTime"`
UpdatedAt time.Time `gorm:"column:updated_at;autoUpdateTime"`
}
func (ZSetMemberRow) TableName ¶
func (ZSetMemberRow) TableName() string
Click to show internal directories.
Click to hide internal directories.