From 6a6b55518847de8d8de8b963a117c53f0c93f67f Mon Sep 17 00:00:00 2001
From: znone <glyc@sina.com.cn>
Date: Tue, 05 Oct 2021 00:50:40 +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