schema node analyze progress
This commit is contained in:
@@ -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());
|
||||
}
|
||||
Reference in New Issue
Block a user