AnCH Framework 0.2
Another C++ Hack: C++23 utility libraries
Loading...
Searching...
No Matches
selectBuilderPart.hpp
1/*
2 ANCH Framework: ANother C++ Hack is a C++ framework based on C++23 standard
3 Copyright (C) 2012 Vincent Lachenal
4
5 This file is part of ANCH Framework.
6
7 ANCH Framework is free software: you can redistribute it and/or modify
8 it under the terms of the GNU Lesser General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 ANCH Framework is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public License
18 along with ANCH Framework. If not, see <https://www.gnu.org/licenses/>.
19*/
20#pragma once
21
22#include "anch-sql-export.hpp"
23
24#include <string>
25#include <cstdint>
26
27#include "sql/builder/sqlQuery.hpp"
28
29
30namespace anch::sql {
31
32 class SelectBuilder;
33 class FieldsBuilder;
34 class ClausesBuilder;
35
45 class ANCH_SQL_EXPORT SelectBuilderPart {
46
47 // Attributes +
48 protected:
51 // Attributes -
52
53 // Constructors +
54 protected:
59
66 // Constructors -
67
68 // Destructor +
73 // Destructor -
74
75 // SQL commands +
76 public:
84 anch::sql::FieldsBuilder groupBy(const std::string& column);
85
93 anch::sql::FieldsBuilder orderBy(const std::string& column);
94
103
112
121
130
139
151 anch::sql::SelectBuilder& windowByRowNumber(const std::string& alias, const std::string& rowColumn, const std::string& order, uint32_t min, uint32_t max);
152
164 anch::sql::SelectBuilder& windowByRank(const std::string& alias, const std::string& rowColumn, const std::string& order, uint32_t min, uint32_t max);
165 // SQL commands -
166
167 // Methods +
168 public:
175
182 // Methods -
183
184 };
185
186} // anch::sql
SQL clauses builder.
Definition clausesBuilder.hpp:88
Field builder.
Definition fieldsBuilder.hpp:44
SQL query.
Definition sqlQuery.hpp:44
Dynamic SQL select request builder.
Definition selectBuilder.hpp:48
anch::sql::SelectBuilder & having(anch::sql::ClausesBuilder &clauses)
anch::sql::FieldsBuilder groupBy(const std::string &column)
anch::sql::SelectBuilder & fetch(uint64_t limit)
anch::sql::SelectBuilder & offset(int64_t offset)
anch::sql::SelectBuilder & done()
anch::sql::SelectBuilder & windowByRowNumber(const std::string &alias, const std::string &rowColumn, const std::string &order, uint32_t min, uint32_t max)
SelectBuilderPart(anch::sql::SelectBuilder &select)
anch::sql::SelectBuilder & unionAll(anch::sql::SelectBuilder &other)
anch::sql::SelectBuilder & _select
Definition selectBuilderPart.hpp:50
anch::sql::SQLQuery build()
anch::sql::FieldsBuilder orderBy(const std::string &column)
anch::sql::SelectBuilder & unionOnce(anch::sql::SelectBuilder &other)
anch::sql::SelectBuilder & windowByRank(const std::string &alias, const std::string &rowColumn, const std::string &order, uint32_t min, uint32_t max)
SQL namespace.
Definition clauses.hpp:28
ClausesBuilder clauses()
SelectBuilder select()