diff --git a/include/sqlgen/select_from.hpp b/include/sqlgen/select_from.hpp index 68efd01..48f5f2c 100644 --- a/include/sqlgen/select_from.hpp +++ b/include/sqlgen/select_from.hpp @@ -89,7 +89,7 @@ auto select_from_impl(const Result>& _res, return select_from_impl( - _conn, _table_or_query, _joins, _where, _limit); + _conn, _fields, _table_or_query, _joins, _where, _limit); }); } diff --git a/tests/postgres/test_enum_namespace.cpp b/tests/postgres/test_enum_namespace.cpp index 1eb62ef..86dfc47 100644 --- a/tests/postgres/test_enum_namespace.cpp +++ b/tests/postgres/test_enum_namespace.cpp @@ -23,7 +23,7 @@ struct MultiStruct { second::IdenticallyNamed enum_two; }; -TEST(mysql, test_enum_namespace) { +TEST(postgres, test_enum_namespace) { using namespace sqlgen; using namespace sqlgen::literals; diff --git a/tests/sqlite/test_enum_namespace.cpp b/tests/sqlite/test_enum_namespace.cpp index 00500ee..35b6a35 100644 --- a/tests/sqlite/test_enum_namespace.cpp +++ b/tests/sqlite/test_enum_namespace.cpp @@ -23,7 +23,7 @@ struct MultiStruct { second::IdenticallyNamed enum_two; }; -TEST(mysql, test_enum_namespace) { +TEST(sqlite, test_enum_namespace) { using namespace sqlgen; using namespace sqlgen::literals; diff --git a/tests/sqlite/test_group_by_with_operations.cpp b/tests/sqlite/test_group_by_with_operations.cpp index 9dee485..f0353ec 100644 --- a/tests/sqlite/test_group_by_with_operations.cpp +++ b/tests/sqlite/test_group_by_with_operations.cpp @@ -45,11 +45,11 @@ TEST(sqlite, test_group_by_with_operations) { round(avg(cast("age"_c))).as<"avg_age">()) | where("age"_c < 18) | group_by("last_name"_c) | to>; - const auto children = sqlite::connect() - .and_then(drop | if_exists) - .and_then(write(std::ref(people1))) - .and_then(get_children) - .value(); + const auto conn = sqlite::connect() + .and_then(drop | if_exists) + .and_then(write(std::ref(people1))); + + const auto children = get_children(conn).value(); EXPECT_EQ(children.size(), 1); EXPECT_EQ(children.at(0).last_name, "Simpson");