func (b *BpTree) Range(from, to int32) (it Iterator, err error) { b.mutex.Lock() defer b.mutex.Unlock() raw, err := b.bpt.Range(int_int.SerializeInt32(from), int_int.SerializeInt32(to)) if err != nil { return nil, err } return b.kvIter(raw), nil }
func (b *BpTree) Remove(key int32, where func(map[string]interface{}) bool) error { b.mutex.Lock() defer b.mutex.Unlock() return b.bpt.Remove(int_int.SerializeInt32(key), func(bytes []byte) bool { return where(DeserializeJson(bytes)) }) }
func (b *BpTree) Remove(key int32, where func(subgraph.Edge) bool) error { b.mutex.Lock() defer b.mutex.Unlock() return b.bpt.Remove(int_int.SerializeInt32(key), func(bytes []byte) bool { return where(DeserializeEdge(bytes)) }) }
func (b *BpTree) Find(key int32) (it Iterator, err error) { b.mutex.Lock() defer b.mutex.Unlock() raw, err := b.bpt.Find(int_int.SerializeInt32(key)) if err != nil { return nil, err } return b.kvIter(raw), nil }
func (b *BpTree) Has(key int32) (bool, error) { b.mutex.Lock() defer b.mutex.Unlock() return b.bpt.Has(int_int.SerializeInt32(key)) }
func (b *BpTree) Count(key int32) (int, error) { b.mutex.Lock() defer b.mutex.Unlock() return b.bpt.Count(int_int.SerializeInt32(key)) }
func (b *BpTree) Add(key int32, val map[string]interface{}) error { b.mutex.Lock() defer b.mutex.Unlock() return b.bpt.Add(int_int.SerializeInt32(key), SerializeJson(val)) }
func (b *BpTree) Add(key int32, val subgraph.Edge) error { b.mutex.Lock() defer b.mutex.Unlock() return b.bpt.Add(int_int.SerializeInt32(key), SerializeEdge(val)) }
func (b *BpTree) Add(key []byte, val int32) error { b.mutex.Lock() defer b.mutex.Unlock() return b.bpt.Add(bytes_subgraph.Identity(key), int_int.SerializeInt32(val)) }
func (b *BpTree) Add(key []int32, val int32) error { b.mutex.Lock() defer b.mutex.Unlock() return b.bpt.Add(ints_ints.SerializeInt32s(key), int_int.SerializeInt32(val)) }