moved query macro generated class to namespace matador::query::meta

This commit is contained in:
Sascha Kühl
2025-11-21 10:12:54 +01:00
parent a146dce321
commit e235c111a1
4 changed files with 32 additions and 23 deletions
+2
View File
@@ -30,6 +30,8 @@ public:
[[nodiscard]] const std::string& name() const;
[[nodiscard]] const std::string& alias() const;
[[nodiscard]] const std::vector<column>& columns() const;
operator const std::vector<column>&() const;
private:
friend class column;
+5 -5
View File
@@ -9,16 +9,16 @@
#include <string>
#include <ostream>
#define FIELD(x) const query::column x{*this, #x, ""};
#define FIELD(x) const column x{*this, #x, ""};
#define QUERY_HELPER(C, ...) \
namespace matador::qh { \
#define QUERY_HELPER(C, V, ...) \
namespace matador::query::meta { \
namespace internal { \
struct C##_query : query::table { \
struct C##_query : table { \
C##_query() : table(#C) {} \
MAP(FIELD, __VA_ARGS__) \
}; } \
static const internal:: C##_query C; \
static const internal:: C##_query V; \
}
#endif //QUERY_QUERY_HELPER_HPP