schema node analyze progress

This commit is contained in:
Sascha Kühl
2025-02-11 16:34:06 +01:00
parent a631a5a36c
commit 1d83abcb1b
18 changed files with 174 additions and 96 deletions
@@ -0,0 +1,22 @@
#include <catch2/catch_test_macros.hpp>
#include "matador/object/primary_key_resolver.hpp"
#include "../test/models/book.hpp"
#include "../test/models/product.hpp"
TEST_CASE("Test primary key resolver", "[PrimaryKeyResolver]") {
using namespace matador;
object::primary_key_resolver resolver;
auto pk_info = resolver.resolve<test::book>();
REQUIRE(pk_info.pk_column_name == "id");
REQUIRE(pk_info.pk.is_integer());
pk_info = resolver.resolve<test::product>();
REQUIRE(pk_info.pk_column_name == "product_name");
REQUIRE(pk_info.pk.is_varchar());
}