SDK  2.1.4 [async]
CloudBackend Software Development Kit - SDK API for C++
cbe::QueryResult Class Reference

resultset of data retrieved. More...

#include <QueryResult.h>

Public Types

using ItemsSnapshot = std::vector< Item >
 A vector of items to hold a snapshot.
 

Public Member Functions

Filter filter () const
 
ItemsSnapshot getItemsSnapshot () const
 Returns a copy of a vector containing the items for this QueryResult. More...
 
std::uint64_t itemsLoaded () const
 
std::uint64_t totalCount () const
 
std::uint64_t objectsLoaded () const
 
std::uint64_t containersLoaded () const
 
bool containsItem (ItemId itemId) const
 
 QueryResult (cbe::DefaultCtor)
 Default constructor. More...
 
 operator bool () const
 Checks if the current instance is real. More...
 

Friends

class CloudBackend
 
class Container
 
class QueryChain
 
class QueryChainSync
 
class ShareManager
 
class SubscribeManager
 
std::ostream & operator<< (std::ostream &os, const QueryResult &queryResult)
 
CBI::ItemDelegatePtr delegate::createCbiQueryDelegate (delegate::QueryDelegatePtr, cbe::util::Context &&)
 
CBI::ItemDelegatePtr delegate::createCbiQueryDelegate (delegate::QueryJoinDelegatePtr, cbe::util::Context &&)
 
CBI::ItemDelegatePtr delegate::createCbiJoinDelegate (delegate::JoinDelegatePtr, cbe::util::Context &&)
 

Detailed Description

resultset of data retrieved.

Constructor & Destructor Documentation

◆ QueryResult()

cbe::QueryResult::QueryResult ( cbe::DefaultCtor  )

Default constructor.

Construct a new object with the DefaultCtor to enable the operator bool() test

Member Function Documentation

◆ containersLoaded()

std::uint64_t cbe::QueryResult::containersLoaded ( ) const

Returns number of containers loaded in to the query result.

◆ containsItem()

bool cbe::QueryResult::containsItem ( ItemId  itemId) const

Checks if the Item with id is in the result-set.

Parameters
itemIdid number of the item asked for

◆ filter()

Filter cbe::QueryResult::filter ( ) const

Returns a copy of the filter used for query.

◆ getItemsSnapshot()

ItemsSnapshot cbe::QueryResult::getItemsSnapshot ( ) const

Returns a copy of a vector containing the items for this QueryResult.

The QueryResult will be updated when new data comes in, but the returned copy will not.

Note
If iterating, make sure to create a variable for a local copy.
Returns
The items matching the query.

◆ itemsLoaded()

std::uint64_t cbe::QueryResult::itemsLoaded ( ) const

Number of items loaded in current QueryResult.

◆ objectsLoaded()

std::uint64_t cbe::QueryResult::objectsLoaded ( ) const

Returns number of objects loaded in to the query result.

◆ operator bool()

cbe::QueryResult::operator bool ( ) const
explicit

Checks if the current instance is real.

An "unreal" instance implies typically a failed event.

Relies on the Default constructor QueryResult(cbe::DefaultCtor)

Returns
true : is real
false : unreal; got nullptr; if current instance is unbound/undefined. I.e., if it is only default constructed.

◆ totalCount()

std::uint64_t cbe::QueryResult::totalCount ( ) const

total number of items in the cloud matching the query result. This may be more than loaded.


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