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

To do a search for Object combining more than one Container table. More...

#include <QueryChain.h>

Inheritance diagram for cbe::QueryChain:

Classes

struct  Exception
 

Public Types

using JoinDelegatePtr = delegate::JoinDelegatePtr
 

Public Member Functions

QueryChain join (Container containerToQuery, std::string key1, std::string key2, JoinDelegatePtr joinDelegate)
 
QueryChain join (Container containerToQuery, std::string key1, std::string key2, Filter constraints, JoinDelegatePtr joinDelegate)
 
QueryChain join (Container containerToQuery, std::string key1, std::string key2, Container containerForResults, JoinDelegatePtr joinDelegate)
 
QueryChain join (Container containerToQuery, std::string key1, std::string key2, Filter constraints, Container containerForResults, JoinDelegatePtr joinDelegate)
 
QueryResult getQueryResult () const
 
 QueryChain (cbe::DefaultCtor)
 
 operator bool () const
 

Friends

class CloudBackend
 
class Container
 
class QueryChainSync
 

Detailed Description

To do a search for Object combining more than one Container table.

[Async] QueryChain is used when a query() is carried out with a solely QueryDelegate.
Anyway, if a subsequent join() will be used, an additional JoinDelegate is required in the join()-call.

Member Function Documentation

◆ getQueryResult()

QueryResult cbe::QueryChain::getQueryResult ( ) const

Returns the QueryResult provided to the delegate after the the last query() or join() call. If this method is called before the delegate call, an empty QueryResult is returned.

◆ join() [1/4]

QueryChain cbe::QueryChain::join ( Container  containerToQuery,
std::string  key1,
std::string  key2,
Container  containerForResults,
JoinDelegatePtr  joinDelegate 
)

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

Parameters
containerForResultsCan be the Container from the previous query if desired items should be from that container.

◆ join() [2/4]

QueryChain cbe::QueryChain::join ( Container  containerToQuery,
std::string  key1,
std::string  key2,
Filter  constraints,
Container  containerForResults,
JoinDelegatePtr  joinDelegate 
)

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

Parameters
constraintsA filter that provides any constraints for the query.

◆ join() [3/4]

QueryChain cbe::QueryChain::join ( Container  containerToQuery,
std::string  key1,
std::string  key2,
Filter  constraints,
JoinDelegatePtr  joinDelegate 
)

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

Parameters
constraintsA filter that provides any constraints for the query.

◆ join() [4/4]

QueryChain cbe::QueryChain::join ( Container  containerToQuery,
std::string  key1,
std::string  key2,
JoinDelegatePtr  joinDelegate 
)

Performs a join request in conjunction with a query, or previous join, to get related items from another container.

Asynchronous version of this service function.

Parameters
containerToQueryThe container of which 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
joinDelegatePointer to a JoinDelegate instance, implemented by the user, that receives the response of this query request.
I.e., either of the JoinDelegate callback functions onJoinSuccess() or onJoinError() will be called.

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