You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem:
executed on an empty table bulk select operation returns a vector with size 1 if called with a vector with size 1.
What I expect:
The table is empty so the vector should have a size of 0 after executing the select statement.
Additional Information (works if I pass a vector with size 2)
executed on an empty table bulk select operation returns a vector with size 0 if called with a vector with size 2.
How to reproduce:
run this catch2 test
TEST_CASE ("bulk operation", "[soci]")
{
usingnamespacesqlite_api;if (notstd::filesystem::exists ("test_db"))
{
sqlite3 *db{};
int rc{};
rc = sqlite3_open ("test_db", &db);
if (rc)
{
fprintf (stderr, "Can't open database: %s\n", sqlite3_errmsg (db));
return;
}
sqlite3_close (db);
soci::session sql (soci::sqlite3, "test_db");
sql << "create table test1 ("" id integer,"")";
}
soci::session sql (soci::sqlite3, "test_db");
int count;
sql << "select count(*) from test1", soci::into (count);
CHECK (count == 0);
auto vec1 = std::vector<int> (1);
sql << "SELECT id FROM test1", soci::into (vec1);
CHECK (vec1.empty ());
auto vec2 = std::vector<int> (2);
sql << "SELECT id FROM test1", soci::into (vec2);
CHECK (vec2.empty ());
}
The text was updated successfully, but these errors were encountered:
werto87
changed the title
executed on an empty table bulk select operation returns a vector with size 1 if called with a vector with size 1
[sqlite3] executed on an empty table bulk select operation returns a vector with size 1 if called with a vector with size 1
Dec 30, 2024
werto87
changed the title
[sqlite3] executed on an empty table bulk select operation returns a vector with size 1 if called with a vector with size 1
[soci/4.0.3,sqlite3] executed on an empty table bulk select operation returns a vector with size 1 if called with a vector with size 1
Dec 30, 2024
Problem:
executed on an empty table bulk select operation returns a vector with size 1 if called with a vector with size 1.
What I expect:
The table is empty so the vector should have a size of 0 after executing the select statement.
Additional Information (works if I pass a vector with size 2)
executed on an empty table bulk select operation returns a vector with size 0 if called with a vector with size 2.
How to reproduce:
run this catch2 test
The text was updated successfully, but these errors were encountered: