#include #include #include #include namespace test_to_insert { struct TestTable { std::string field1; int32_t field2; sqlgen::PrimaryKey id; std::optional nullable; }; TEST(general, test_to_insert) { const auto insert_stmt = sqlgen::transpilation::to_insert(); const std::string expected = R"({"table":{"name":"TestTable"},"columns":["field1","field2","id","nullable"]})"; const auto json_str = rfl::json::write(insert_stmt); EXPECT_EQ(json_str, expected); } } // namespace test_to_insert