query builder progress

This commit is contained in:
Sascha Kühl
2025-12-03 16:18:03 +01:00
parent bfbbd4c589
commit 19eb54df8d
11 changed files with 360 additions and 192 deletions
+6 -1
View File
@@ -1,6 +1,7 @@
#include <catch2/catch_test_macros.hpp>
#include "matador/object/attribute.hpp"
#include "matador/object/object_generator.hpp"
#include "matador/sql/connection.hpp"
@@ -13,6 +14,7 @@
#include "QueryFixture.hpp"
#include "models/airplane.hpp"
#include "models/location.hpp"
using namespace matador::sql;
using namespace matador::object;
@@ -32,8 +34,11 @@ class StatementTestFixture : public QueryFixture
public:
StatementTestFixture()
{
const auto obj = object_generator::generate<airplane>(repo, "airplane");
const auto res = query::create()
.table<airplane>("airplane", repo)
.table(obj->name())
.columns(obj->attributes())
.constraints(obj->constraints())
.execute(db);
REQUIRE(res.is_ok());
tables_to_drop.emplace("airplane");