From 5fbf0b3033197c4530da9e0ec11cd4097c2a75f7 Mon Sep 17 00:00:00 2001 From: jie Date: Tue, 24 Dec 2024 19:16:08 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9Query=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/sqlConnection.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sqlConnection.h b/include/sqlConnection.h index 64d69c0..0699d2a 100644 --- a/include/sqlConnection.h +++ b/include/sqlConnection.h @@ -149,7 +149,7 @@ public: mysql_free_result(mysql_result); } - return really_result; + return std::unexpected(get_error_msg()); } bool Execute(std::string_view command){ From ce32948c6724521a517c927e12091373d1087590 Mon Sep 17 00:00:00 2001 From: jie Date: Wed, 25 Dec 2024 15:18:02 +0800 Subject: [PATCH 2/2] Update include/sqlConnection.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复query函数返回 --- include/sqlConnection.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/sqlConnection.h b/include/sqlConnection.h index 0699d2a..2e243b1 100644 --- a/include/sqlConnection.h +++ b/include/sqlConnection.h @@ -147,6 +147,7 @@ public: } mysql_free_result(mysql_result); + return really_result; } return std::unexpected(get_error_msg());