SDK  2.1.4
CloudBackend Software Development Kit - SDK API for C++
cbe::QueryChainSync Class Reference

Synchronous version of querychain. More...

#include <QueryChainSync.h>

Inheritance diagram for cbe::QueryChainSync:
Collaboration diagram for cbe::QueryChainSync:

Public Types

using JoinException = delegate::JoinDelegate::Exception
 
- Public Types inherited from cbe::QueryResult
using ItemsSnapshot = std::vector< Item >
 A vector of items to hold a snapshot.
 

Public Member Functions

QueryChainSync join (Container containerToQuery, std::string key1, std::string key2)
 
QueryChainSync join (Container containerToQuery, std::string key1, std::string key2, Filter constraints)
 
QueryChainSync join (Container containerToQuery, std::string key1, std::string key2, Container containerForResults)
 
QueryChainSync join (Container containerToQuery, std::string key1, std::string key2, Filter constraints, Container containerForResults)
 
QueryResult getQueryResult () const
 
- Public Member Functions inherited from cbe::QueryResult
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

template<class ImplT , typename... QueryAsyncArgsTs>
QueryChainSync querySync (ImplT &impl, delegate::QueryJoinDelegate::ErrorInfo *queryJoinError, const char *fnName, QueryAsyncArgsTs &&... queryAsyncArgs)
 

Detailed Description

Synchronous version of querychain.

Provides the possibility to chain synchronous join() calls after either a query() or join() in a synchronous call.

Member Typedef Documentation

◆ JoinException

Member Function Documentation

◆ join() [1/4]

QueryChainSync cbe::QueryChainSync::join ( Container  containerToQuery,
std::string  key1,
std::string  key2 
)

Synchronous version of QueryChain::query(), and throws an exception, JoinException, in case of a failed join.

See also
QueryChain::join(Container,std::string,std::string,delegate::JoinDelegatePtr)
Parameters
containerToQueryThe container the join shall be done with.
key1The key from the previous query on which to perform the join.
key2The key on objects in containerToQuery on which to perform the join
Exceptions
JoinExceptionPossible only if current instance of QueryChainSync has been retrieved by a call to any of the following methods:

◆ join() [2/4]

QueryChainSync cbe::QueryChainSync::join ( Container  containerToQuery,
std::string  key1,
std::string  key2,
Filter  constraints 
)

Same as join(Container,std::string,std::string), but with an additional Filter parameter constraints.

See also
join(Container,std::string,std::string)
Parameters
constraintsA Filter that provides any constraints for the query.

◆ join() [3/4]

QueryChainSync cbe::QueryChainSync::join ( Container  containerToQuery,
std::string  key1,
std::string  key2,
Container  containerForResults 
)

Same as join(Container,std::string,std::string), but with an additional Container parameter containerForResults.

See also
join(Container,std::string,std::string)
Parameters
containerForResultsThe Container from the previous query, if desired items originate from that container.

◆ join() [4/4]

QueryChainSync cbe::QueryChainSync::join ( Container  containerToQuery,
std::string  key1,
std::string  key2,
Filter  constraints,
Container  containerForResults 
)

Same as join(Container,std::string,std::string,Container), but with an additional Filter parameter constraints.

See also
join(Container,std::string,std::string,Container)
Parameters
constraintsA Filter that provides any constraints for the query.

◆ getQueryResult()

QueryResult cbe::QueryChainSync::getQueryResult ( ) const

Returns the QueryResult provided to the delegate after the the last query() or join() call.


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