Documentation ¶
Index ¶
- Constants
- func LocalSeq(ctx context.Context, tx port.EngineReadTransaction, doc *model.Document) error
- type ChangesIndex
- func (i *ChangesIndex) DocumentDeleted(ctx context.Context, tx port.EngineWriteTransaction, doc *model.Document) error
- func (i *ChangesIndex) DocumentStored(ctx context.Context, tx port.EngineWriteTransaction, doc *model.Document) error
- func (i *ChangesIndex) Ensure(ctx context.Context, tx port.EngineWriteTransaction) error
- func (i *ChangesIndex) IteratorOptions(ctx context.Context) (*model.IteratorOptions, error)
- func (i *ChangesIndex) Remove(ctx context.Context, tx port.EngineWriteTransaction) error
- func (i *ChangesIndex) Stats(ctx context.Context, tx port.EngineReadTransaction) (*model.IndexStats, error)
- func (i *ChangesIndex) String() string
- func (i *ChangesIndex) UpdateStored(ctx context.Context, tx port.EngineWriteTransaction, docs []*model.Document) error
- type ExternalSearchIndex
- func (i *ExternalSearchIndex) DocumentDeleted(ctx context.Context, tx port.EngineWriteTransaction, doc *model.Document) error
- func (i *ExternalSearchIndex) DocumentStored(ctx context.Context, tx port.EngineWriteTransaction, doc *model.Document) error
- func (i *ExternalSearchIndex) Ensure(ctx context.Context, tx port.EngineWriteTransaction) error
- func (i *ExternalSearchIndex) IteratorOptions(ctx context.Context) (*model.IteratorOptions, error)
- func (i *ExternalSearchIndex) Remove(ctx context.Context, tx port.EngineWriteTransaction) error
- func (i *ExternalSearchIndex) SearchDocuments(ctx context.Context, ddfn *model.DesignDocFn, sq *port.SearchQuery) (*port.SearchResult, error)
- func (i *ExternalSearchIndex) SourceType() model.FnType
- func (i *ExternalSearchIndex) Stats(ctx context.Context, tx port.EngineReadTransaction) (*model.IndexStats, error)
- func (i *ExternalSearchIndex) String() string
- func (i *ExternalSearchIndex) UpdateMapping(docs []*model.Document) error
- func (i *ExternalSearchIndex) UpdateSource(ctx context.Context, doc *model.Document, f *model.Function) error
- func (i *ExternalSearchIndex) UpdateStored(ctx context.Context, tx port.EngineWriteTransaction, docs []*model.Document) error
- type IndexFunc
- type IterKeyFunc
- type RegularIndex
- func (i *RegularIndex) DocumentDeleted(ctx context.Context, tx port.EngineWriteTransaction, doc *model.Document) error
- func (i *RegularIndex) DocumentStored(ctx context.Context, tx port.EngineWriteTransaction, doc *model.Document) error
- func (i *RegularIndex) Ensure(ctx context.Context, tx port.EngineWriteTransaction) error
- func (i *RegularIndex) IteratorOptions(ctx context.Context) (*model.IteratorOptions, error)
- func (i *RegularIndex) Remove(ctx context.Context, tx port.EngineWriteTransaction) error
- func (i *RegularIndex) RemoveOldKeys(tx port.EngineWriteTransaction, doc *model.Document) error
- func (i *RegularIndex) Stats(ctx context.Context, tx port.EngineReadTransaction) (*model.IndexStats, error)
- func (i *RegularIndex) String() string
- func (i *RegularIndex) UpdateStored(ctx context.Context, tx port.EngineWriteTransaction, docs []*model.Document) error
- type RegularIndexFunc
- type UniqueIndex
- func (i *UniqueIndex) DocumentDeleted(ctx context.Context, tx port.EngineWriteTransaction, doc *model.Document) error
- func (i *UniqueIndex) DocumentStored(ctx context.Context, tx port.EngineWriteTransaction, doc *model.Document) error
- func (i *UniqueIndex) Ensure(ctx context.Context, tx port.EngineWriteTransaction) error
- func (i *UniqueIndex) IteratorOptions(ctx context.Context) (*model.IteratorOptions, error)
- func (i *UniqueIndex) Remove(ctx context.Context, tx port.EngineWriteTransaction) error
- func (i *UniqueIndex) Stats(ctx context.Context, tx port.EngineReadTransaction) (*model.IndexStats, error)
- func (i *UniqueIndex) String() string
- func (i *UniqueIndex) UpdateStored(ctx context.Context, tx port.EngineWriteTransaction, docs []*model.Document) error
- type UniqueIndexUint64
- type UniqueIndexUint64KeyFunc
- type ViewIndex
Constants ¶
const ( ChangesIndexName = "_changes" ChangesIndexInvalidationName = "_changes:invalidation" )
const DeletedIndexName = "_deleted"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChangesIndex ¶
type ChangesIndex struct {
// contains filtered or unexported fields
}
func NewChangesIndex ¶
func NewChangesIndex() *ChangesIndex
func (*ChangesIndex) DocumentDeleted ¶
func (i *ChangesIndex) DocumentDeleted(ctx context.Context, tx port.EngineWriteTransaction, doc *model.Document) error
func (*ChangesIndex) DocumentStored ¶
func (i *ChangesIndex) DocumentStored(ctx context.Context, tx port.EngineWriteTransaction, doc *model.Document) error
func (*ChangesIndex) Ensure ¶
func (i *ChangesIndex) Ensure(ctx context.Context, tx port.EngineWriteTransaction) error
func (*ChangesIndex) IteratorOptions ¶
func (i *ChangesIndex) IteratorOptions(ctx context.Context) (*model.IteratorOptions, error)
func (*ChangesIndex) Remove ¶
func (i *ChangesIndex) Remove(ctx context.Context, tx port.EngineWriteTransaction) error
func (*ChangesIndex) Stats ¶
func (i *ChangesIndex) Stats(ctx context.Context, tx port.EngineReadTransaction) (*model.IndexStats, error)
func (*ChangesIndex) String ¶
func (i *ChangesIndex) String() string
func (*ChangesIndex) UpdateStored ¶
func (i *ChangesIndex) UpdateStored(ctx context.Context, tx port.EngineWriteTransaction, docs []*model.Document) error
type ExternalSearchIndex ¶
type ExternalSearchIndex struct { SearchFn string // contains filtered or unexported fields }
func NewExternalSearchIndex ¶
func NewExternalSearchIndex(ddfn *model.DesignDocFn, engines port.ViewEngines, path string) *ExternalSearchIndex
func (*ExternalSearchIndex) DocumentDeleted ¶
func (i *ExternalSearchIndex) DocumentDeleted(ctx context.Context, tx port.EngineWriteTransaction, doc *model.Document) error
func (*ExternalSearchIndex) DocumentStored ¶
func (i *ExternalSearchIndex) DocumentStored(ctx context.Context, tx port.EngineWriteTransaction, doc *model.Document) error
func (*ExternalSearchIndex) Ensure ¶
func (i *ExternalSearchIndex) Ensure(ctx context.Context, tx port.EngineWriteTransaction) error
func (*ExternalSearchIndex) IteratorOptions ¶
func (i *ExternalSearchIndex) IteratorOptions(ctx context.Context) (*model.IteratorOptions, error)
func (*ExternalSearchIndex) Remove ¶
func (i *ExternalSearchIndex) Remove(ctx context.Context, tx port.EngineWriteTransaction) error
func (*ExternalSearchIndex) SearchDocuments ¶
func (i *ExternalSearchIndex) SearchDocuments(ctx context.Context, ddfn *model.DesignDocFn, sq *port.SearchQuery) (*port.SearchResult, error)
func (*ExternalSearchIndex) SourceType ¶
func (i *ExternalSearchIndex) SourceType() model.FnType
func (*ExternalSearchIndex) Stats ¶
func (i *ExternalSearchIndex) Stats(ctx context.Context, tx port.EngineReadTransaction) (*model.IndexStats, error)
func (*ExternalSearchIndex) String ¶
func (i *ExternalSearchIndex) String() string
func (*ExternalSearchIndex) UpdateMapping ¶
func (i *ExternalSearchIndex) UpdateMapping(docs []*model.Document) error
UpdateMapping can extend the mapping configuration for the index. NOT: CouchDB inherited behavior is, that the index can only be extended but fields can't be removed, for that the index has to be rebuild. Also the configuration of a field can't be changed once given.
func (*ExternalSearchIndex) UpdateSource ¶
func (*ExternalSearchIndex) UpdateStored ¶
func (i *ExternalSearchIndex) UpdateStored(ctx context.Context, tx port.EngineWriteTransaction, docs []*model.Document) error
type IterKeyFunc ¶
type RegularIndex ¶
type RegularIndex struct {
// contains filtered or unexported fields
}
RegularIndex is able to store the same value multiple times, does so by adding the document id (which is unique) to the end of the document key.
func NewRegularIndex ¶
func NewRegularIndex(ddfn *model.DesignDocFn, idxFn RegularIndexFunc) *RegularIndex
func (*RegularIndex) DocumentDeleted ¶
func (i *RegularIndex) DocumentDeleted(ctx context.Context, tx port.EngineWriteTransaction, doc *model.Document) error
func (*RegularIndex) DocumentStored ¶
func (i *RegularIndex) DocumentStored(ctx context.Context, tx port.EngineWriteTransaction, doc *model.Document) error
func (*RegularIndex) Ensure ¶
func (i *RegularIndex) Ensure(ctx context.Context, tx port.EngineWriteTransaction) error
func (*RegularIndex) IteratorOptions ¶
func (i *RegularIndex) IteratorOptions(ctx context.Context) (*model.IteratorOptions, error)
func (*RegularIndex) Remove ¶
func (i *RegularIndex) Remove(ctx context.Context, tx port.EngineWriteTransaction) error
func (*RegularIndex) RemoveOldKeys ¶
func (i *RegularIndex) RemoveOldKeys(tx port.EngineWriteTransaction, doc *model.Document) error
func (*RegularIndex) Stats ¶
func (i *RegularIndex) Stats(ctx context.Context, tx port.EngineReadTransaction) (*model.IndexStats, error)
func (*RegularIndex) String ¶
func (i *RegularIndex) String() string
func (*RegularIndex) UpdateStored ¶
func (i *RegularIndex) UpdateStored(ctx context.Context, tx port.EngineWriteTransaction, docs []*model.Document) error
type RegularIndexFunc ¶
RegularIndexFunc gets a document and returns multiple keys and values or nil, nil.
type UniqueIndex ¶
type UniqueIndex struct {
// contains filtered or unexported fields
}
UniqueIndex base class for all indices that are based on a bucket and work synchronously.
func NewDeletedIndex ¶
func NewDeletedIndex() *UniqueIndex
func NewUniqueIndex ¶
func NewUniqueIndex(bucketName string, key, value IndexFunc) *UniqueIndex
func (*UniqueIndex) DocumentDeleted ¶
func (i *UniqueIndex) DocumentDeleted(ctx context.Context, tx port.EngineWriteTransaction, doc *model.Document) error
func (*UniqueIndex) DocumentStored ¶
func (i *UniqueIndex) DocumentStored(ctx context.Context, tx port.EngineWriteTransaction, doc *model.Document) error
func (*UniqueIndex) Ensure ¶
func (i *UniqueIndex) Ensure(ctx context.Context, tx port.EngineWriteTransaction) error
func (*UniqueIndex) IteratorOptions ¶
func (i *UniqueIndex) IteratorOptions(ctx context.Context) (*model.IteratorOptions, error)
func (*UniqueIndex) Remove ¶
func (i *UniqueIndex) Remove(ctx context.Context, tx port.EngineWriteTransaction) error
func (*UniqueIndex) Stats ¶
func (i *UniqueIndex) Stats(ctx context.Context, tx port.EngineReadTransaction) (*model.IndexStats, error)
func (*UniqueIndex) String ¶
func (i *UniqueIndex) String() string
func (*UniqueIndex) UpdateStored ¶
func (i *UniqueIndex) UpdateStored(ctx context.Context, tx port.EngineWriteTransaction, docs []*model.Document) error
type UniqueIndexUint64 ¶
type UniqueIndexUint64 struct {
UniqueIndex
}
func NewUniqueIndexUint64 ¶
func NewUniqueIndexUint64(name string, kf UniqueIndexUint64KeyFunc, value IndexFunc) *UniqueIndexUint64
NewUniqueIndexUint64 creates a sorted uint64 index that can be scanned in order using the iterator
func (*UniqueIndexUint64) String ¶
func (i *UniqueIndexUint64) String() string
type ViewIndex ¶
type ViewIndex struct { *RegularIndex MapFn string // contains filtered or unexported fields }
func NewViewIndex ¶
func NewViewIndex(ddfn *model.DesignDocFn, engines port.ViewEngines) *ViewIndex