CoreDX DDS Modern C++ API
|
Query objects contain expressions that allow the application to specify a filter on the locally available data. More...
Public Types | |
typedef DELEGATE::iterator | iterator |
Iterator for the query expression parameters. | |
typedef DELEGATE::const_iterator | const_iterator |
Iterator for the query expression parameters. | |
Public Member Functions | |
Query (const dds::sub::AnyDataReader &dr, const std::string &expression) | |
Create a dds::sub::Query associated with an dds::sub::AnyDataReader. More... | |
template<typename FWIterator > | |
Query (const dds::sub::AnyDataReader &dr, const std::string &expression, const FWIterator ¶ms_begin, const FWIterator ¶ms_end) | |
Create a dds::sub::Query associated with an dds::sub::AnyDataReader. More... | |
Query (const dds::sub::AnyDataReader &dr, const std::string &expression, const std::vector< std::string > ¶ms) | |
Create a dds::sub::Query associated with an dds::sub::AnyDataReader. More... | |
const std::string & | expression () const |
Get expression. More... | |
void | expression (const std::string &expr) |
Set new expression. More... | |
const_iterator | begin () const |
Provides the begin iterator to the SQL expression parameter list. More... | |
const_iterator | end () const |
The end iterator to the SQL expression parameter list. More... | |
iterator | begin () |
Provides the begin iterator to the SQL expression parameter list. More... | |
iterator | end () |
The end iterator to the SQL expression parameter list. More... | |
template<typename FWIterator > | |
void | parameters (const FWIterator &begin, const FWIterator end) |
Sets the query parameters. More... | |
void | add_parameter (const std::string ¶m) |
Adds a parameter to the query. More... | |
uint32_t | parameters_length () const |
Gets the number of parameters in the query. More... | |
const AnyDataReader & | data_reader () const |
This operation returns the DataReader associated with the Query. More... | |
Public Member Functions inherited from dds::core::Reference< DELEGATE > | |
Reference (dds::core::null_type &) | |
Creates a "null" reference. | |
Reference (const Reference &ref) | |
Creates a reference from another. More... | |
template<typename D > | |
Reference (const Reference< D > &ref) | |
Enables safe assignment from other reference types. More... | |
Reference (DELEGATE_T *p) | |
The following two constructors create a dds Reference from a vendor specific delegate. More... | |
~Reference () | |
Destroys a reference. | |
template<typename R > | |
bool | operator== (const R &ref) const |
Compares two reference objects and returns true if they are equal. More... | |
template<typename R > | |
bool | operator!= (const R &ref) const |
Compares two reference objects and returns true if they are not-equal. More... | |
Reference & | operator= (const null_type) |
Special assignment operators that takes care of assigning null to this reference. More... | |
bool | is_nil () const |
Returns true if this reference object is nil, meaning pointing to null. | |
bool | operator== (const null_type) const |
Special operator== used to check if this reference object equals the null reference. More... | |
bool | operator!= (const null_type nil) const |
Special operator!= used to check if this reference object does not equals the null reference. More... | |
const DELEGATE_REF_T & | delegate () const |
Returns a reference to the underlying delegate. More... | |
DELEGATE_REF_T & | delegate () |
Returns a reference to the underlying delegate. More... | |
DELEGATE * | operator-> () |
The operator->() is provided to be able to directly invoke methods on the delegate. More... | |
const DELEGATE * | operator-> () const |
The operator->() is provided to be able to directly invoke methods on the delegate. More... | |
Query objects contain expressions that allow the application to specify a filter on the locally available data.
A Query is used in a QueryCondition or DataReader::Selector and is associated with one DataReader.
dds::sub::Query::Query | ( | const dds::sub::AnyDataReader & | dr, |
const std::string & | expression | ||
) |
Create a dds::sub::Query associated with an dds::sub::AnyDataReader.
dr | The AnyDataReader to associate with the Query. |
expression | SQL expression |
dds::core::Exception |
dds::sub::Query::Query | ( | const dds::sub::AnyDataReader & | dr, |
const std::string & | expression, | ||
const FWIterator & | params_begin, | ||
const FWIterator & | params_end | ||
) |
Create a dds::sub::Query associated with an dds::sub::AnyDataReader.
dr | The AnyDataReader to associate with the Query. |
expression | SQL expression |
params_begin | Iterator pointing to the beginning of the parameters to set |
params_end | Iterator pointing to the end of the parameters to set |
dds::core::Exception |
dds::sub::Query::Query | ( | const dds::sub::AnyDataReader & | dr, |
const std::string & | expression, | ||
const std::vector< std::string > & | params | ||
) |
Create a dds::sub::Query associated with an dds::sub::AnyDataReader.
dr | The AnyDataReader to associate with the Query. |
expression | SQL expression |
params | Vector containing SQL expression parameters |
dds::core::Exception |
void dds::sub::Query::add_parameter | ( | const std::string & | param | ) |
const_iterator dds::sub::Query::begin | ( | ) | const |
Provides the begin iterator to the SQL expression parameter list.
dds::core::Exception |
iterator dds::sub::Query::begin | ( | ) |
Provides the begin iterator to the SQL expression parameter list.
dds::core::Exception |
const AnyDataReader& dds::sub::Query::data_reader | ( | ) | const |
This operation returns the DataReader associated with the Query.
Note that there is exactly one DataReader associated with each Query.
dds::core::Exception |
const_iterator dds::sub::Query::end | ( | ) | const |
The end iterator to the SQL expression parameter list.
dds::core::Exception |
iterator dds::sub::Query::end | ( | ) |
The end iterator to the SQL expression parameter list.
dds::core::Exception |
const std::string& dds::sub::Query::expression | ( | ) | const |
void dds::sub::Query::expression | ( | const std::string & | expr | ) |
void dds::sub::Query::parameters | ( | const FWIterator & | begin, |
const FWIterator | end | ||
) |
Sets the query parameters.
begin | Iterator pointing to the beginning of the parameters to set |
end | Iterator pointing to the end of the parameters to set |
dds::core::Exception |
uint32_t dds::sub::Query::parameters_length | ( | ) | const |
Gets the number of parameters in the query.
dds::core::Exception |