Make sure the first test compiles

This commit is contained in:
Dr. Patrick Urbanke
2025-04-21 18:05:12 +02:00
parent 39d78d7cb5
commit b167d37dca
6 changed files with 84 additions and 61 deletions

View File

@@ -14,12 +14,17 @@ struct TestTable {
};
TEST(postgres, test_to_select_from) {
/*const auto select_from_stmt =
const auto select_from_stmt =
sqlgen::transpilation::to_select_from<TestTable>();
const auto conn = sqlgen::postgres::connect().value();
const auto credentials = sqlgen::postgres::Credentials{.user = "postgres",
.password = "postgres",
.host = "localhost",
.dbname = "postgres",
.port = 5432};
const auto conn = sqlgen::postgres::connect(credentials).value();
const auto expected =
R"(SELECT "field1", "field2", "id", "nullable" FROM "TestTable";)";
EXPECT_EQ(conn->to_sql(select_from_stmt), expected);*/
EXPECT_EQ(conn->to_sql(select_from_stmt), expected);
}
} // namespace test_to_select_from