added alter table command to fluent query builder

This commit is contained in:
Sascha Kühl
2025-11-05 11:05:03 +01:00
parent c87a4c29b4
commit 4b51ad21da
27 changed files with 343 additions and 282 deletions
+8
View File
@@ -66,6 +66,14 @@ TEST_CASE_METHOD(QueryFixture, "Test drop table sql statement string", "[query]"
REQUIRE(result == R"(DROP TABLE "person")");
}
TEST_CASE_METHOD(QueryFixture, "Test select all columns with asterisk", "[query][select][asterisk]") {
const auto result = query::select()
.from("person")
.str(*db);
REQUIRE(result == R"(SELECT * FROM "person")");
}
TEST_CASE_METHOD(QueryFixture, "Test select sql statement string", "[query]") {
const auto result = query::select({"id", "name", "age"})
.from("person")
+3 -2
View File
@@ -172,11 +172,11 @@ TEST_CASE("Test LRU cache evicts oldest entries", "[statement][cache][evict]") {
result = cache.acquire({"SELECT title FROM book"});
REQUIRE(result);
auto stmt2 = result.value();
result = cache.acquire({"SELECT name FROM author"}); // Should evict first statement
result = cache.acquire({"SELECT name FROM author"}); // Should evict the first statement
REQUIRE(result);
auto stmt3 = result.value();
// Trigger re-prepare of evicted statement
// Trigger re-prepares of an evicted statement
result = cache.acquire({"SELECT 1"});
REQUIRE(result);
auto stmt4 = result.value();
@@ -317,6 +317,7 @@ TEST_CASE("Race condition simulation with mixed access", "[statement_cache][race
};
std::vector<std::thread> jobs;
jobs.reserve(threads);
for (int i = 0; i < threads; ++i) {
jobs.emplace_back(task, i);
}