1
// Copyright (c) 2014 Couchbase, Inc.
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
7
// http://www.apache.org/licenses/LICENSE-2.0
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
18
"github.com/blevesearch/bleve/index/store"
19
"github.com/blevesearch/bleve/registry"
26
func New(mo store.MergeOperator, config map[string]interface{}) (store.KVStore, error) {
30
func (i *Store) Close() error {
34
func (i *Store) Reader() (store.KVReader, error) {
38
func (i *Store) Writer() (store.KVWriter, error) {
44
func (r *reader) Get(key []byte) ([]byte, error) {
48
func (r *reader) MultiGet(keys [][]byte) ([][]byte, error) {
49
return make([][]byte, len(keys)), nil
52
func (r *reader) PrefixIterator(prefix []byte) store.KVIterator {
56
func (r *reader) RangeIterator(start, end []byte) store.KVIterator {
60
func (r *reader) Close() error {
64
type iterator struct{}
66
func (i *iterator) SeekFirst() {}
67
func (i *iterator) Seek(k []byte) {}
68
func (i *iterator) Next() {}
70
func (i *iterator) Current() ([]byte, []byte, bool) {
71
return nil, nil, false
74
func (i *iterator) Key() []byte {
78
func (i *iterator) Value() []byte {
82
func (i *iterator) Valid() bool {
86
func (i *iterator) Close() error {
92
func (i *batch) Set(key, val []byte) {}
93
func (i *batch) Delete(key []byte) {}
94
func (i *batch) Merge(key, val []byte) {}
95
func (i *batch) Reset() {}
96
func (i *batch) Close() error { return nil }
100
func (w *writer) NewBatch() store.KVBatch {
104
func (w *writer) NewBatchEx(options store.KVBatchOptions) ([]byte, store.KVBatch, error) {
105
return make([]byte, options.TotalBytes), w.NewBatch(), nil
108
func (w *writer) ExecuteBatch(store.KVBatch) error {
112
func (w *writer) Close() error {
117
registry.RegisterKVStore(Name, New)