Couchbase Lite C++
Couchbase Lite C++ API
Loading...
Searching...
No Matches
cbl::QueryIndex Class Reference

Represents an existing index in a collection. More...

#include <cbl++/QueryIndex.hh>

Inheritance diagram for cbl::QueryIndex:

Public Member Functions

std::string name () const
 The index's name.
Collection collection () const
 A index's collection.
IndexUpdater beginUpdate (size_t limit)
 Finds new or updated documents for which vectors need to be (re)computed and returns an IndexUpdater object for setting the computed vectors to update the index.
 QueryIndex () noexcept
 Constructs a null reference (one that points to no object).
QueryIndexoperator= (std::nullptr_t)
 Releases the underlying object and resets this to a null reference.
bool valid () const
 Returns true if this references an object, or false if it is a null reference.
 operator bool () const
 Returns true if this references an object (same as valid).
bool operator== (const QueryIndex &other) const
 Returns true if both sides reference the same object, or are both null references.
bool operator!= (const QueryIndex &other) const
 Returns true if the two sides reference different objects.
CBLQueryIndex *_Nullable ref () const
 Returns a pointer to the underlying C object (CBLQueryIndex), or NULL if this is a null reference.
 QueryIndex (const QueryIndex &other) noexcept
 Copy constructor: creates another reference to the same object as other.
 QueryIndex (QueryIndex &&other) noexcept
 Move constructor: takes over the reference from other, leaving it a null reference.
QueryIndexoperator= (const QueryIndex &other) noexcept
 Copy assignment: replaces this reference with a reference to other's object.
QueryIndexoperator= (QueryIndex &&other) noexcept
 Move assignment: replaces this reference with other's, leaving other a null reference.

Protected Member Functions

 QueryIndex (CBLQueryIndex *_Nullable ref)
 (Internal) Constructs a reference wrapping, and retaining, a C object pointer.

Static Protected Member Functions

static QueryIndex adopt (const CBLQueryIndex *_Nullable i, CBLError *error)

Friends

class Collection

Detailed Description

Represents an existing index in a collection.

Constructor & Destructor Documentation

◆ QueryIndex() [1/4]

cbl::QueryIndex::QueryIndex ( )
inlinenoexcept

Constructs a null reference (one that points to no object).

◆ QueryIndex() [2/4]

cbl::QueryIndex::QueryIndex ( CBLQueryIndex *_Nullable ref)
inlineexplicitprotected

(Internal) Constructs a reference wrapping, and retaining, a C object pointer.

◆ QueryIndex() [3/4]

cbl::QueryIndex::QueryIndex ( const QueryIndex & other)
inlinenoexcept

Copy constructor: creates another reference to the same object as other.

◆ QueryIndex() [4/4]

cbl::QueryIndex::QueryIndex ( QueryIndex && other)
inlinenoexcept

Move constructor: takes over the reference from other, leaving it a null reference.

Member Function Documentation

◆ adopt()

QueryIndex cbl::QueryIndex::adopt ( const CBLQueryIndex *_Nullable i,
CBLError * error )
inlinestaticprotected

◆ beginUpdate()

IndexUpdater cbl::QueryIndex::beginUpdate ( size_t limit)
inline

Finds new or updated documents for which vectors need to be (re)computed and returns an IndexUpdater object for setting the computed vectors to update the index.

If the index is not lazy, an error will be returned.

Note
ENTERPRISE EDITION ONLY
For updating lazy vector indexes only.
Parameters
limitThe maximum number of vectors to be computed.
Returns
An IndexUpdater object for setting the computed vectors to update the index, or NULL if the index is up-to-date.

◆ collection()

Collection cbl::QueryIndex::collection ( ) const
inline

A index's collection.

◆ name()

std::string cbl::QueryIndex::name ( ) const
inline

The index's name.

◆ operator bool()

cbl::QueryIndex::operator bool ( ) const
inlineexplicit

Returns true if this references an object (same as valid).

◆ operator!=()

bool cbl::QueryIndex::operator!= ( const QueryIndex & other) const
inline

Returns true if the two sides reference different objects.

◆ operator=() [1/3]

QueryIndex & cbl::QueryIndex::operator= ( const QueryIndex & other)
inlinenoexcept

Copy assignment: replaces this reference with a reference to other's object.

◆ operator=() [2/3]

QueryIndex & cbl::QueryIndex::operator= ( QueryIndex && other)
inlinenoexcept

Move assignment: replaces this reference with other's, leaving other a null reference.

◆ operator=() [3/3]

QueryIndex & cbl::QueryIndex::operator= ( std::nullptr_t )
inline

Releases the underlying object and resets this to a null reference.

◆ operator==()

bool cbl::QueryIndex::operator== ( const QueryIndex & other) const
inline

Returns true if both sides reference the same object, or are both null references.

◆ ref()

CBLQueryIndex *_Nullable cbl::QueryIndex::ref ( ) const
inline

Returns a pointer to the underlying C object (CBLQueryIndex), or NULL if this is a null reference.

◆ valid()

bool cbl::QueryIndex::valid ( ) const
inline

Returns true if this references an object, or false if it is a null reference.

◆ Collection

friend class Collection
friend

The documentation for this class was generated from the following file: