<<value-type>> Encapsulates a query for a dds::sub::cond::QueryCondition.
More...
#include <dds/sub/Query.hpp>
<<value-type>> Encapsulates a query for a dds::sub::cond::QueryCondition.
A query contains the DataReader to query data from, an expression and optionally a list of parameters.
Queries and Filters Syntax defines the syntax of the expression and the parameters.
- See also
- Filtering with Query Conditions
◆ Query() [1/3]
template<typename T >
dds::sub::Query::Query |
( |
const dds::sub::DataReader< T > & |
reader, |
|
|
const std::string & |
query_expression |
|
) |
| |
|
inline |
Creates a query.
- Template Parameters
-
- Parameters
-
reader | DataReader to query data from |
query_expression | Expression describing the query |
◆ Query() [2/3]
template<typename T , typename FWIterator >
dds::sub::Query::Query |
( |
const dds::sub::DataReader< T > & |
reader, |
|
|
const std::string & |
query_expression, |
|
|
const FWIterator & |
params_begin, |
|
|
const FWIterator & |
params_end |
|
) |
| |
|
inline |
Creates a query with the expression parameters in an iterator range.
- Template Parameters
-
T | The topic-type of the DataReader |
FWIterator | A forward iterator whose value type is std::string (or convertible to std::string) |
- Parameters
-
reader | DataReader to query data from |
query_expression | Expression describing the query |
params_begin | The beginning of a range of parameters for the query expression |
params_end | The end of the range |
◆ Query() [3/3]
template<typename T >
dds::sub::Query::Query |
( |
const dds::sub::DataReader< T > & |
reader, |
|
|
const std::string & |
query_expression, |
|
|
const std::vector< std::string > & |
params |
|
) |
| |
|
inline |
Creates a query with the expression parameters in a vector.
- Template Parameters
-
- Parameters
-
reader | DataReader to query data from |
query_expression | Expression describing the query |
params | The parameters for the query expression |
◆ expression()
const std::string& dds::sub::Query::expression |
( |
| ) |
const |
|
inline |
◆ begin() [1/2]
const_iterator dds::sub::Query::begin |
( |
| ) |
const |
|
inline |
Provides the begin iterator to the parameter list.
- Returns
- A random-access iterator whose value type is std::string
◆ end() [1/2]
const_iterator dds::sub::Query::end |
( |
| ) |
const |
|
inline |
Provides the end iterator to the parameter list.
- Returns
- A random-access iterator whose value type is std::string
◆ begin() [2/2]
iterator dds::sub::Query::begin |
( |
| ) |
|
|
inline |
Provides the begin iterator to the parameter list.
- Returns
- A random-access iterator whose value type is std::string
◆ end() [2/2]
iterator dds::sub::Query::end |
( |
| ) |
|
|
inline |
Provides the end iterator to the parameter list.
- Returns
- A random-access iterator whose value type is std::string
◆ parameters() [1/2]
template<typename FWIterator >
void dds::sub::Query::parameters |
( |
const FWIterator & |
the_begin, |
|
|
const FWIterator |
the_end |
|
) |
| |
|
inline |
Sets the parameters for the expression.
- Template Parameters
-
FWIterator | A forward iterator whose value type is std::string (or convertible to std::string) |
- Parameters
-
the_begin | The beginning of a range of parameters for the query expression |
the_end | The end of the range |
◆ add_parameter()
void dds::sub::Query::add_parameter |
( |
const std::string & |
param | ) |
|
|
inline |
◆ parameters_length()
size_t dds::sub::Query::parameters_length |
( |
| ) |
const |
|
inline |
Gets the number of parameters.
◆ parameters() [2/2]
const std::vector<std::string>& dds::sub::Query::parameters |
( |
| ) |
const |
◆ name() [1/2]
std::string dds::sub::Query::name |
( |
| ) |
const |
<<extension>> Gets the filter name
- Returns
- The name of the filter, or an empty string when using the default SQL filter.
◆ name() [2/2]
◆ data_reader()