A QueryCondition is a specialized ReadCondition which includes a filter. More...
Public Member Functions | |
const char * | get_query_expression (void) |
This routine returns the SQL query expression of this QueryCondition. More... | |
ReturnCode_t | get_query_parameters (StringSeq &seq) |
This routine returns the parameters to the SQL query expression of this QueryCondition. More... | |
ReturnCode_t | set_query_parameters (const StringSeq &seq) |
This routine sets the parameters to the SQL query expression of this QueryCondition. More... | |
Public Member Functions inherited from DDS::ReadCondition | |
bool | get_trigger_value () |
This routine returns the current value of the trigger_value in rc. More... | |
DataReader * | get_datareader () |
This routine returns the single DataReader associated with this ReadCondition. | |
SampleStateKind | get_sample_state_mask () |
This routine returns the current value of the sample_state in this ReadCondition. | |
ViewStateKind | get_view_state_mask () |
This routine returns the current value of the view_state in this ReadCondition. | |
InstanceStateKind | get_instance_state_mask () |
This routine returns the current value of the instance_state in this ReadCondition. | |
A QueryCondition is a specialized ReadCondition which includes a filter.
The trigger_value is driven by the data available, after applying the filter, in the associated DataReader.
const char* DDS::QueryCondition::get_query_expression | ( | void | ) |
This routine returns the SQL query expression of this QueryCondition.
The query expression is an SQL syntax conditional expression that is provided when the QueryCondition is created.
ReturnCode_t DDS::QueryCondition::get_query_parameters | ( | StringSeq & | seq | ) |
This routine returns the parameters to the SQL query expression of this QueryCondition.
The query expression is an SQL syntax conditional expression that is provided when the QueryCondition is created. The query expression may contain references to positional parameters of the form '%0', '%1'. These parameters can be changed dynamically to affect the expression.
ReturnCode_t DDS::QueryCondition::set_query_parameters | ( | const StringSeq & | seq | ) |
This routine sets the parameters to the SQL query expression of this QueryCondition.
The query_expression is an SQL like condition expression, and the parameters argument provides optional parameters that are referenced by the query_expression. The syntax for refering to paramters in a query_expression is the percent sign '' followed by a number. The number is the index of the paramter in the query_paramters sequence. Parameters are counted starting at zero. So, "%0" refers to the first parameter, and "%4" refers to the fifth paramter. Using this syntax, the expression "x<%0" would test the value of 'x' against the first parameter in the sequence.
This routine allows the parameters to be changed dynamically.