backend tests progress

This commit is contained in:
2024-02-01 17:14:48 +01:00
parent 7c02d745c8
commit c025fb282a
23 changed files with 354 additions and 272 deletions
-1
View File
@@ -23,7 +23,6 @@ add_executable(tests QueryBuilderTest.cpp
models/person.hpp
AnyTypeToVisitorTest.cpp
ColumnTest.cpp
StatementCacheTest.cpp
models/coordinate.hpp
models/location.hpp
models/optional.hpp
-22
View File
@@ -1,22 +0,0 @@
#include <catch2/catch_test_macros.hpp>
#include "matador/sql/connection_info.hpp"
#include "matador/sql/connection_pool.hpp"
#include "matador/sql/session.hpp"
#include "matador/sql/statement_cache.hpp"
using namespace matador;
TEST_CASE("Acquire prepared statement", "[statement cache]") {
sql::statement_cache cache;
sql::connection_pool<sql::connection> pool("sqlite://sqlite.db", 4);
sql::session s(pool);
auto conn = pool.acquire();
std::string sql = R"(SELECT * FROM person WHERE name = 'george')";
// auto &stmt = cache.acquire(sql, *conn);
}