query builder progress
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user