From 9e1e4a1b59fba183d5ad0e86594d0df5d2892f11 Mon Sep 17 00:00:00 2001 From: Jacyking <791026912@qq.com> Date: Thu, 30 Nov 2023 16:38:35 +0800 Subject: [PATCH] pg update --- example/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/example/main.cpp b/example/main.cpp index f7e7689b..994ca02b 100644 --- a/example/main.cpp +++ b/example/main.cpp @@ -72,7 +72,7 @@ int main() { sqlite.insert({"purecpp"}); sqlite.insert({"purecpp", 6}); auto vec = sqlite.query(); - for (auto &[id, name, age] : vec) { + for (auto &[name, age, id] : vec) { std::cout << id << ", " << *name << ", " << *age << "\n"; } } @@ -85,13 +85,13 @@ int main() { sqlite.insert({0, "purecpp", 3}); { auto vec = sqlite.query("name='purecpp'", "order by age desc"); - for (auto &[id, name, age] : vec) { + for (auto &[name, age, id] : vec) { std::cout << id << ", " << name << ", " << age << "\n"; } } { auto vec = sqlite.query("age=3", "order by id desc", "limit 1"); - for (auto &[id, name, age] : vec) { + for (auto &[name, age, id] : vec) { std::cout << id << ", " << name << ", " << age << "\n"; } }