#include #include #include #include namespace test_to_select_from { struct TestTable { std::string field1; int32_t field2; sqlgen::PrimaryKey id; std::optional nullable; }; TEST(sqlite, test_to_select_from) { const auto select_from_stmt = sqlgen::transpilation::to_select_from(); const auto conn = sqlgen::sqlite::connect().value(); const auto expected = R"(SELECT "field1", "field2", "id", "nullable" FROM "TestTable";)"; EXPECT_EQ(conn->to_sql(select_from_stmt), expected); } } // namespace test_to_select_from