mirror of
https://github.com/getml/sqlgen.git
synced 2026-01-07 10:00:26 -06:00
Make sure the first test compiles
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user