schema progress

This commit is contained in:
Sascha Kühl
2025-02-04 15:19:01 +01:00
parent 6a5974337d
commit f01e9ff87f
17 changed files with 416 additions and 276 deletions
-1
View File
@@ -10,7 +10,6 @@
#include <string>
namespace matador::sql {
class schema;
class connection_impl;
/**
+24
View File
@@ -0,0 +1,24 @@
#ifndef QUERY_QUERY_HELPER_HPP
#define QUERY_QUERY_HELPER_HPP
#include "matador/utils/macro_map.hpp"
#include "matador/sql/table.hpp"
#include "matador/sql/column.hpp"
#include <string>
#include <ostream>
#define FIELD(x) const sql::column x{*this, #x, ""};
#define QUERY_HELPER(C, ...) \
namespace matador::qh { \
namespace internal { \
struct C##_query : sql::table { \
C##_query() : table(#C) {} \
MAP(FIELD, __VA_ARGS__) \
}; } \
static const internal:: C##_query C; \
}
#endif //QUERY_QUERY_HELPER_HPP