23#include "cbl/CBLQueryIndex.h"
28#ifdef COUCHBASE_ENTERPRISE
43#ifdef COUCHBASE_ENTERPRISE
60 if (!i && error->
code != 0)
61 internal::check(
false, *error);
70#ifdef COUCHBASE_ENTERPRISE
84 fleece::Value
value(
size_t index)
const {
117 internal::check(i !=
nullptr || error->
code == 0, *error);
#define CBL_REFCOUNTED_BOILERPLATE(CLASS, SUPER, C_TYPE)
Definition Base.hh:160
#define CBL_ASSUME_NONNULL_END
#define CBL_ASSUME_NONNULL_BEGIN
CBLCollection *_Nullable ref() const
Returns a pointer to the underlying C object (CBLCollection), or NULL if this is a null reference.
Definition Collection.hh:373
std::string name() const
The collection's name.
Definition Collection.hh:136
QueryIndex getIndex(std::string_view name)
Get an index by name.
Definition QueryIndex.hh:134
friend class QueryIndex
Definition Collection.hh:371
Updates a lazy index by setting the computed vectors for the documents returned from QueryIndex::begi...
Definition QueryIndex.hh:76
void setVector(unsigned index, const float *_Nullable vector, size_t dimension)
Sets the vector for the value corresponding to the given index.
Definition QueryIndex.hh:94
size_t count() const
The total number of vectors to compute and set for updating the index.
Definition QueryIndex.hh:79
IndexUpdater() noexcept
Constructs a null reference (one that points to no object).
Definition QueryIndex.hh:124
static IndexUpdater adopt(const CBLIndexUpdater *_Nullable i, CBLError *error)
Definition QueryIndex.hh:116
fleece::Value value(size_t index) const
Get the value at the given index for computing the vector.
Definition QueryIndex.hh:84
CBLIndexUpdater *_Nullable ref() const
Returns a pointer to the underlying C object (CBLIndexUpdater), or NULL if this is a null reference.
Definition QueryIndex.hh:124
void finish()
Updates the index with the computed vectors and removes any index rows for which null vector was give...
Definition QueryIndex.hh:110
friend class QueryIndex
Definition QueryIndex.hh:123
void skipVector(size_t index)
Skip setting the vector for the value corresponding to the index.
Definition QueryIndex.hh:102
IndexUpdater beginUpdate(size_t limit)
Finds new or updated documents for which vectors need to be (re)computed and returns an IndexUpdater ...
Definition QueryIndex.hh:127
Collection collection() const
A index's collection.
Definition QueryIndex.hh:41
static QueryIndex adopt(const CBLQueryIndex *_Nullable i, CBLError *error)
Definition QueryIndex.hh:59
friend class Collection
Definition QueryIndex.hh:57
CBLQueryIndex *_Nullable ref() const
Returns a pointer to the underlying C object (CBLQueryIndex), or NULL if this is a null reference.
Definition QueryIndex.hh:67
QueryIndex() noexcept
Constructs a null reference (one that points to no object).
Definition QueryIndex.hh:67
std::string name() const
The index's name.
Definition QueryIndex.hh:38
_cbl_warn_unused CBLQueryIndex *_cbl_nullable CBLCollection_GetIndex(CBLCollection *collection, FLString name, CBLError *_cbl_nullable outError)
FLValue CBLIndexUpdater_Value(CBLIndexUpdater *updater, size_t index)
FLString CBLQueryIndex_Name(const CBLQueryIndex *index)
struct CBLQueryIndex CBLQueryIndex
bool CBLIndexUpdater_Finish(CBLIndexUpdater *updater, CBLError *_cbl_nullable outError)
CBLCollection * CBLQueryIndex_Collection(const CBLQueryIndex *index)
struct CBLIndexUpdater CBLIndexUpdater
bool CBLIndexUpdater_SetVector(CBLIndexUpdater *updater, size_t index, const float vector[_cbl_nullable], size_t dimension, CBLError *_cbl_nullable outError)
size_t CBLIndexUpdater_Count(const CBLIndexUpdater *updater)
void CBLIndexUpdater_SkipVector(CBLIndexUpdater *updater, size_t index)
_cbl_warn_unused CBLIndexUpdater *_cbl_nullable CBLQueryIndex_BeginUpdate(CBLQueryIndex *index, size_t limit, CBLError *_cbl_nullable outError)
struct CBLRefCounted CBLRefCounted
fleece::slice slice
Convenience alias for fleece::slice, a non-owning view of a byte range.
Definition Base.hh:49