41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
#ifndef QUERY_FROM_INTERMEDIATE_HPP
|
|
#define QUERY_FROM_INTERMEDIATE_HPP
|
|
|
|
#include "matador/query/intermediates/fetchable_query.hpp"
|
|
#include "matador/query/join_data.hpp"
|
|
|
|
#include "matador/query/intermediates/query_where_intermediate.hpp"
|
|
|
|
namespace matador::query {
|
|
|
|
class query_join_intermediate;
|
|
|
|
class query_from_intermediate : public fetchable_query
|
|
{
|
|
public:
|
|
using fetchable_query::fetchable_query;
|
|
|
|
query_join_intermediate join_left(const sql::table &t);
|
|
query_from_intermediate join_left(join_data &data);
|
|
query_from_intermediate join_left(std::vector<join_data> &data_vector);
|
|
|
|
template<class Condition>
|
|
query_where_intermediate where(const Condition &cond)
|
|
{
|
|
return where_clause(std::make_unique<Condition>(std::move(cond)));
|
|
}
|
|
query_where_intermediate where(std::unique_ptr<basic_condition> &&cond)
|
|
{
|
|
return where_clause(std::move(cond));
|
|
}
|
|
query_group_by_intermediate group_by(const sql::column &col);
|
|
query_order_by_intermediate order_by(const sql::column &col);
|
|
|
|
private:
|
|
query_where_intermediate where_clause(std::unique_ptr<basic_condition> &&cond);
|
|
};
|
|
|
|
}
|
|
|
|
#endif //QUERY_FROM_INTERMEDIATE_HPP
|