added sqlite connection class (progress)
This commit is contained in:
+7
-2
@@ -12,6 +12,11 @@ add_executable(tests builder.cpp
|
||||
session.cpp
|
||||
record.cpp
|
||||
connection_pool.cpp
|
||||
query.cpp)
|
||||
target_link_libraries(tests PRIVATE Catch2::Catch2WithMain matador)
|
||||
query.cpp
|
||||
backend_provider.cpp)
|
||||
target_link_libraries(tests PRIVATE
|
||||
Catch2::Catch2WithMain
|
||||
matador
|
||||
${CMAKE_DL_LIBS}
|
||||
${SQLite3_LIBRARIES})
|
||||
target_include_directories(tests PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>/include)
|
||||
@@ -0,0 +1,20 @@
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
#include "matador/sql/backend_provider.hpp"
|
||||
|
||||
#include "matador/utils/os.hpp"
|
||||
|
||||
using namespace matador::sql;
|
||||
|
||||
TEST_CASE("Load backend", "[backend provider]") {
|
||||
auto path = matador::utils::os::getenv("MATADOR_BACKENDS_PATH");
|
||||
if (path.back() != '\\') {
|
||||
path.push_back('\\');
|
||||
}
|
||||
|
||||
REQUIRE(!path.empty());
|
||||
|
||||
backend_provider provider(path);
|
||||
|
||||
const auto &d = provider.connection_dialect("sqlite");
|
||||
}
|
||||
Reference in New Issue
Block a user