From e5bcc49fd4e8f776877d45b1596306790c006a06 Mon Sep 17 00:00:00 2001 From: "Dr. Patrick Urbanke" Date: Sun, 21 Sep 2025 09:17:42 +0200 Subject: [PATCH 1/2] Fixed typo in select_from --- include/sqlgen/select_from.hpp | 2 +- tests/sqlite/test_group_by_with_operations.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/sqlgen/select_from.hpp b/include/sqlgen/select_from.hpp index 68efd01f..48f5f2cf 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/sqlite/test_group_by_with_operations.cpp b/tests/sqlite/test_group_by_with_operations.cpp index 9dee4853..f0353ec4 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"); From ef876bd7f51453871e549b819e9ee5e5e6777734 Mon Sep 17 00:00:00 2001 From: "Dr. Patrick Urbanke" Date: Sun, 21 Sep 2025 10:05:34 +0200 Subject: [PATCH 2/2] Fixed minor typos --- tests/postgres/test_enum_namespace.cpp | 2 +- tests/sqlite/test_enum_namespace.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/postgres/test_enum_namespace.cpp b/tests/postgres/test_enum_namespace.cpp index 1eb62ef7..86dfc47d 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 00500ee2..35b6a35e 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;