From 9ed5ee9526d36df8d5b96fd461c08c7c56e1dc04 Mon Sep 17 00:00:00 2001
From: znone <glyc@sina.com.cn>
Date: Sat, 15 Apr 2017 09:32:33 +0000
Subject: [PATCH] 支持返回多结果集的查询
---
test/TestMysql.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/TestMysql.cpp b/test/TestMysql.cpp
index 53330c1..d7dda0b 100644
--- a/test/TestMysql.cpp
+++ b/test/TestMysql.cpp
@@ -214,7 +214,7 @@
fs.clear();
fs.seekg(0, ios::beg);
id=db.insert("INSERT INTO test_blob (Filename, Content, MD5) values(?, ?, ?)",
- make_tuple(filename, ref((istream&)fs), qtl::const_blob_data(md5, sizeof(md5))));
+ forward_as_tuple(filename, (istream&)fs, qtl::const_blob_data(md5, sizeof(md5))));
}
catch(qtl::mysql::error& e)
{
@@ -238,7 +238,7 @@
fs.seekg(ios::beg);
std::string source_file;
db.query_first("SELECT Filename, Content, MD5 FROM test_blob WHERE id=?", make_tuple(id),
- make_tuple(ref(source_file), ref((ostream&)fs), qtl::blob_data(md5, sizeof(md5))));
+ forward_as_tuple(source_file, (ostream&)fs, qtl::blob_data(md5, sizeof(md5))));
fs.flush();
mysql_hex_string(md5_hex, (char*)md5, sizeof(md5));
printf("MD5 of file %s stored in database: %s.\n", source_file.data(), md5_hex);
--
Gitblit v1.9.3