From a77db3e50bb5429b17e8d89bf71403dfdf39985c Mon Sep 17 00:00:00 2001
From: znone <glyc@sina.com.cn>
Date: Sat, 09 Oct 2021 04:16:09 +0000
Subject: [PATCH] Query_iterator remove std::iterator. MySQL: Fix some error. PostgreSQL: Support binding to std::any and std::optional.
---
test/TestPostgres.cpp | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/test/TestPostgres.cpp b/test/TestPostgres.cpp
index 60ee70a..ecce8b9 100644
--- a/test/TestPostgres.cpp
+++ b/test/TestPostgres.cpp
@@ -320,12 +320,10 @@
{
db.query("select 0, 'hello world', LOCALTIMESTAMP",
[](const std::any& i, const std::any& str, const std::any& now) {
- const qtl::postgres::time& time = std::any_cast<const qtl::postgres::time&>(now);
- struct tm tm;
- time.as_tm(tm);
+ const qtl::postgres::timestamp& time = std::any_cast<const qtl::postgres::timestamp&>(now);
cout << "0=\"" << std::any_cast<int32_t>(i) << "\", 'hello world'=\"" <<
std::any_cast<const std::string&>(str) << "\", now=\"" <<
- std::put_time(&tm, "%c") << "\" \n";
+ time.to_string() << "\" \n";
});
}
catch (qtl::postgres::error& e)
--
Gitblit v1.9.3