-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathstorer.go
More file actions
46 lines (36 loc) · 1.03 KB
/
storer.go
File metadata and controls
46 lines (36 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package memdb
import (
"time"
"github.com/nedscode/memdb/persist"
)
// Storer provides the functionality of a memdb store.
type Storer interface {
Indexer
SetIndexer(indexer Indexer)
SetComparator(comparator Comparator)
SetExpirer(expirer Expirer)
SetFielder(fielder Fielder)
PrimaryKey(fields ...string) *Store
CreateIndex(fields ...string) *Store
Unique() *Store
Reversed(order ...bool) *Store
Persistent(persister persist.Persister) error
Get(search interface{}) interface{}
Put(item interface{}) (interface{}, error)
PutAll(items []interface{}) error
Delete(search interface{}) (interface{}, error)
InPrimaryKey() IndexSearcher
In(fields ...string) IndexSearcher
Info(cb InfoIterator)
Ascend(cb Iterator)
AscendStarting(at interface{}, cb Iterator)
Descend(cb Iterator)
DescendStarting(at interface{}, cb Iterator)
Expire() int
ExpireInterval(interval time.Duration)
Len() int
Indexes() [][]string
IndexStats(fields ...string) []*IndexStats
Keys(fields ...string) []string
On(event Event, notify NotifyFunc)
}