diff --git a/.clang-format b/.clang-format index 43fd511e..272dae40 100644 --- a/.clang-format +++ b/.clang-format @@ -14,6 +14,3 @@ DisableFormat: true # Ignore json file Language: Json DisableFormat: true - -Language: Proto -DisableFormat: true \ No newline at end of file diff --git a/.gitignore b/.gitignore index 47d23529..39821c17 100644 --- a/.gitignore +++ b/.gitignore @@ -34,4 +34,5 @@ # .idea *build* -.vscode \ No newline at end of file +.vscode +.cache diff --git a/cmake/platform.cmake b/cmake/platform.cmake index 8031b601..2d347647 100644 --- a/cmake/platform.cmake +++ b/cmake/platform.cmake @@ -1,5 +1,5 @@ if (MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++latest") else () - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -std=c++17") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -ldl -std=c++17") endif () \ No newline at end of file diff --git a/ormpp/sqlite.hpp b/ormpp/sqlite.hpp index 6bc02c4c..c741b9ba 100644 --- a/ormpp/sqlite.hpp +++ b/ormpp/sqlite.hpp @@ -31,10 +31,10 @@ class sqlite { std::string get_last_error() const { return last_error_; } - template - bool connect(Args &&...args) { + template + bool connect(Arg &&arg, Args &&...) { reset_error(); - auto r = sqlite3_open(std::forward(args)..., &handle_); + auto r = sqlite3_open(std::forward(arg), &handle_); if (r != SQLITE_OK) { set_last_error(sqlite3_errmsg(handle_)); return false; @@ -42,6 +42,8 @@ class sqlite { return true; } + bool ping() { return true; } + template bool disconnect(Args &&...args) { if (handle_ != nullptr) {