constraint, column and table query progress
This commit is contained in:
@@ -105,8 +105,14 @@ TEST_CASE("Test one to many", "[relation][one-to-many]") {
|
||||
REQUIRE(repo.contains("departments"));
|
||||
REQUIRE(repo.contains("employees"));
|
||||
|
||||
std::cout << *repo.basic_info("departments")->get().object();
|
||||
std::cout << *repo.basic_info("employees")->get().object();
|
||||
auto info = repo.basic_info("departments")->get();
|
||||
REQUIRE(!info.endpoints_empty());
|
||||
REQUIRE(info.endpoints_size() == 1);
|
||||
std::cout << *info.object();
|
||||
info = repo.basic_info("employees")->get();
|
||||
REQUIRE(!info.endpoints_empty());
|
||||
REQUIRE(info.endpoints_size() == 1);
|
||||
std::cout << *info.object();
|
||||
}
|
||||
|
||||
TEST_CASE("Test one to many reverse", "[relation][one-to-many][reverse]") {
|
||||
@@ -121,8 +127,14 @@ TEST_CASE("Test one to many reverse", "[relation][one-to-many][reverse]") {
|
||||
REQUIRE(repo.contains("departments"));
|
||||
REQUIRE(repo.contains("employees"));
|
||||
|
||||
std::cout << *repo.basic_info("departments")->get().object();
|
||||
std::cout << *repo.basic_info("employees")->get().object();
|
||||
auto info = repo.basic_info("departments")->get();
|
||||
REQUIRE(!info.endpoints_empty());
|
||||
REQUIRE(info.endpoints_size() == 1);
|
||||
std::cout << *info.object();
|
||||
info = repo.basic_info("employees")->get();
|
||||
REQUIRE(!info.endpoints_empty());
|
||||
REQUIRE(info.endpoints_size() == 1);
|
||||
std::cout << *info.object();
|
||||
}
|
||||
|
||||
TEST_CASE("Test many to many relation", "[relation][many-to-many]") {
|
||||
@@ -142,4 +154,18 @@ TEST_CASE("Test many to many relation", "[relation][many-to-many]") {
|
||||
std::cout << *repo.basic_info("ingredients")->get().object();
|
||||
std::cout << *repo.basic_info("recipes")->get().object();
|
||||
std::cout << *repo.basic_info("recipe_ingredients")->get().object();
|
||||
|
||||
|
||||
auto info = repo.basic_info("ingredients")->get();
|
||||
REQUIRE(!info.endpoints_empty());
|
||||
REQUIRE(info.endpoints_size() == 1);
|
||||
std::cout << *info.object();
|
||||
info = repo.basic_info("recipes")->get();
|
||||
REQUIRE(!info.endpoints_empty());
|
||||
REQUIRE(info.endpoints_size() == 1);
|
||||
std::cout << *info.object();
|
||||
info = repo.basic_info("recipe_ingredients")->get();
|
||||
REQUIRE(!info.endpoints_empty());
|
||||
REQUIRE(info.endpoints_size() == 2);
|
||||
std::cout << *info.object();
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
#include <matador/query/criteria.hpp>
|
||||
#include <matador/query/query.hpp>
|
||||
#include "matador/query/table.hpp"
|
||||
#include "matador/query/column.hpp"
|
||||
#include "matador/query/builder.hpp"
|
||||
|
||||
#include "matador/sql/connection.hpp"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user