added alter table command to fluent query builder
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user