Skip to content

Commit

Permalink
Removed vestigial Sqlite package, removed version fixing on mongocxx(…
Browse files Browse the repository at this point in the history
… for some reason this makes it compile) Current new issue: Certain mongocxx header files such as server_api.hpp don't exist for the project.
  • Loading branch information
MrNen committed Nov 29, 2023
1 parent 59a2c11 commit e73fb63
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 8 deletions.
8 changes: 6 additions & 2 deletions include/Core/Database.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

#include <string>

#include "bsoncxx/builder/basic/document.hpp"

#include <bsoncxx/builder/basic/document.hpp>
#include <bsoncxx/json.hpp>
#include <mongocxx/client.hpp>
#include <mongocxx/instance.hpp>
Expand All @@ -14,8 +15,11 @@
class Database
{

Database();
Database(const std::string& uri);
~Database();


mongocxx::instance instance;
mongocxx::collection accounts;

};
1 change: 1 addition & 0 deletions project/FLHook.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<ClCompile Include="..\Source\Core\Commands\CommandLineParser.cpp" />
<ClCompile Include="..\Source\Core\Commands\ExternalCommandProcessor.cpp" />
<ClCompile Include="..\Source\Core\Commands\UserCommandProcessor.cpp" />
<ClCompile Include="..\Source\Core\Database.cpp" />
<ClCompile Include="..\Source\Core\Debug.cpp" />
<ClCompile Include="..\source\Core\ExceptionHandler.cpp" />
<ClCompile Include="..\Source\Core\FLPacket.cpp" />
Expand Down
3 changes: 3 additions & 0 deletions project/FLHook.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@
<ClCompile Include="..\source\API\FLHook\PersonalityHelper.cpp">
<Filter>Source\API\FLHook</Filter>
</ClCompile>
<ClCompile Include="..\Source\Core\Database.cpp">
<Filter>Source\Core</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\Include\Core\Commands\AbstractAdminCommandProcessor.hpp">
Expand Down
27 changes: 27 additions & 0 deletions source/Core/Database.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include "PCH.hpp"

#include "Core/Database.hpp"

using bsoncxx::builder::basic::kvp;
using bsoncxx::builder::basic::make_array;
using bsoncxx::builder::basic::make_document;
using bsoncxx::builder::stream::document;

Database::Database(const std::string& uri)
{
try
{
const auto mongoURI = mongocxx::uri{ uri };
mongocxx::options::client clientOptions;
//TODO: Why does this server_api object not exist? It is on both the spike and documentation.
const auto api = mongocxx::options::server_api{ mongocxx::options::server_api::version::k_version_1 };


}
catch (std::exception& err)
{
Logger::Log(LogLevel::Err, StringUtils::stows(std::string(err.what())));

}

}
7 changes: 1 addition & 6 deletions vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,7 @@
"version>=": "1.44.2"
},
{
"name": "sqlite-orm",
"version>=": "1.8.1"
},
{
"name" : "mongo-cxx-driver",
"version>=" : "3.9.0"
"name" : "mongo-cxx-driver"
}
]
}

0 comments on commit e73fb63

Please sign in to comment.