From 929ca77668f6d4a5cf92f865efeb55fd5cf5f6da Mon Sep 17 00:00:00 2001 From: Jacyking <791026912@qq.com> Date: Tue, 15 Aug 2023 16:09:49 +0800 Subject: [PATCH] add alias and copy iguana --- iguana/reflection.hpp | 2 ++ tests/test_ormpp.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/iguana/reflection.hpp b/iguana/reflection.hpp index 3f482154..b928d631 100644 --- a/iguana/reflection.hpp +++ b/iguana/reflection.hpp @@ -618,7 +618,9 @@ constexpr std::array get_alias_arr(Args... pairs) { static std::string alisa_fields; \ for (const auto &it : arr()) { \ alisa_fields += it.data(); \ + alisa_fields += ","; \ } \ + alisa_fields.back() = ' '; \ return alisa_fields; \ } \ constexpr static size_t value() { return size_type::value; } \ diff --git a/tests/test_ormpp.cpp b/tests/test_ormpp.cpp index 53a62c2b..5f6ddc5e 100644 --- a/tests/test_ormpp.cpp +++ b/tests/test_ormpp.cpp @@ -1028,7 +1028,7 @@ TEST_CASE("get_insert_id") { // sqlite.insert({0, "purecpp", 200}); // sqlite.delete_records("name = 'other';drop table person"); // auto vec = sqlite.query(); -// CHECK(vec.size() == 0); +// CHECK(vec.size() == 2); // } // #endif // }