From 8f19567a5977d8ac1be88a9bd20cc0cb6c07b271 Mon Sep 17 00:00:00 2001 From: marcelb Date: Thu, 31 Oct 2024 17:55:11 +0100 Subject: [PATCH] Fix when no have params --- lib/sqlite3.hpp | 2 +- test/test.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sqlite3.hpp b/lib/sqlite3.hpp index f5e46c2..0a2a61a 100644 --- a/lib/sqlite3.hpp +++ b/lib/sqlite3.hpp @@ -37,7 +37,7 @@ public: * Make a request to the database */ - map> query(const string& sql_command, const vector& values); + map> query(const string& sql_command, const vector& values = {}); /** * Close the database and destroy the object diff --git a/test/test.cpp b/test/test.cpp index c32a7ec..9e059bd 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -9,7 +9,7 @@ int main() { SQLite3 mydb("../example/example.db", false); - auto res = mydb.query("Select * from Tab1 Where id > ?", {"3"}); + auto res = mydb.query("Select * from Tab1"); // cout << endl << res["NAME"][1]; // cout << endl << res["MAIL"][1];