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

The results of a query. More...

#include <cbl++/Query.hh>

Inheritance diagram for cbl::ResultSet:

Public Types

using iterator = ResultSetIterator

Public Member Functions

iterator begin ()
 Returns an iterator positioned at the first result.
iterator end ()
 Returns an iterator marking the end of the results.
 ResultSet () noexcept
 Constructs a null reference (one that points to no object).
ResultSetoperator= (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 ResultSet &other) const
 Returns true if both sides reference the same object, or are both null references.
bool operator!= (const ResultSet &other) const
 Returns true if the two sides reference different objects.
CBLResultSet *_Nullable ref () const
 Returns a pointer to the underlying C object (CBLResultSet), or NULL if this is a null reference.
 ResultSet (const ResultSet &other) noexcept
 Copy constructor: creates another reference to the same object as other.
 ResultSet (ResultSet &&other) noexcept
 Move constructor: takes over the reference from other, leaving it a null reference.
ResultSetoperator= (const ResultSet &other) noexcept
 Copy assignment: replaces this reference with a reference to other's object.
ResultSetoperator= (ResultSet &&other) noexcept
 Move assignment: replaces this reference with other's, leaving other a null reference.

Protected Member Functions

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

Friends

class Query

Detailed Description

The results of a query.

The only access to the individual Results is to iterate them.

Member Typedef Documentation

◆ iterator

Constructor & Destructor Documentation

◆ ResultSet() [1/4]

cbl::ResultSet::ResultSet ( )
inlinenoexcept

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

◆ ResultSet() [2/4]

cbl::ResultSet::ResultSet ( CBLResultSet *_Nullable ref)
inlineexplicitprotected

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

◆ ResultSet() [3/4]

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

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

◆ ResultSet() [4/4]

cbl::ResultSet::ResultSet ( ResultSet && other)
inlinenoexcept

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

Member Function Documentation

◆ begin()

ResultSet::iterator cbl::ResultSet::begin ( )
inline

Returns an iterator positioned at the first result.

◆ end()

ResultSet::iterator cbl::ResultSet::end ( )
inline

Returns an iterator marking the end of the results.

◆ operator bool()

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

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

◆ operator!=()

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

Returns true if the two sides reference different objects.

◆ operator=() [1/3]

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

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

◆ operator=() [2/3]

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

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

◆ operator=() [3/3]

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

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

◆ operator==()

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

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

◆ ref()

CBLResultSet *_Nullable cbl::ResultSet::ref ( ) const
inline

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

◆ valid()

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

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

◆ Query

friend class Query
friend

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