22 lines
569 B
C++
22 lines
569 B
C++
#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);
|
|
|
|
|
|
|
|
} |