moved query macro generated class to namespace matador::query::meta
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user