matador::condition< column, detail::basic_query > Class Reference

Condition class representing an IN condition. More...

#include <condition.hpp>

Inherits detail::basic_column_condition.

Public Member Functions

 condition (column col, detail::basic_condition::t_operand op, detail::basic_query q)
 Create a query IN condition.
 
std::string evaluate (basic_dialect &dialect) const override
 Evaluates the condition.
 

Detailed Description

Condition class representing an IN condition.

This class represents an query IN condition and evaluates to this condition based on the current database dialect

WHERE age IN (select age_value from <table>)
query< T > select(const std::string &table)
Creates a select query for type T.
Definition query.hpp:642

Constructor & Destructor Documentation

◆ condition()

matador::condition< column, detail::basic_query >::condition ( column  col,
detail::basic_condition< column, detail::basic_query >::t_operand  op,
detail::basic_query  q 
)
inline

Create a query IN condition.

Create an IN condition where the argument values come from the given query. To evaluate the query a sql dialect must be given.

Parameters
colColumn for the IN condition
opOperand of the condition
qThe query to be evaluated to the IN arguments

Member Function Documentation

◆ evaluate()

std::string matador::condition< column, detail::basic_query >::evaluate ( basic_dialect dialect) const
inlineoverride

Evaluates the condition.

Evaluates the condition to a part of the query string based on the given compile type

Parameters
dialectThe dialect used to evaluate
Returns
A condition IN part of the query

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