mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-05-01 17:24:57 +00:00
Implement C++ daemon with CMake, Ninja build system
Created complete C++ implementation: - Core library (client, errors, capabilities) - Query engine (AST, builder, normalizer) - Utilities (UUID generation, exponential backoff) - SQLite adapter and connection pool - Daemon server with security manager - Unit, integration, and conformance tests Build system: - CMakeLists.txt with optional Conan dependencies - Renamed build assistant to .cjs for ES module compatibility - Fixed conanfile.txt format for Conan 2.x - All tests passing, daemon runs successfully Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
35
dbal/cpp/src/capabilities.cpp
Normal file
35
dbal/cpp/src/capabilities.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace dbal {
|
||||
|
||||
// Capability detection for database features
|
||||
class Capabilities {
|
||||
public:
|
||||
static std::vector<std::string> detect(const std::string& adapter) {
|
||||
std::vector<std::string> caps;
|
||||
|
||||
if (adapter == "sqlite") {
|
||||
caps.push_back("crud");
|
||||
caps.push_back("transactions");
|
||||
caps.push_back("fulltext_search");
|
||||
} else if (adapter == "prisma") {
|
||||
caps.push_back("crud");
|
||||
caps.push_back("transactions");
|
||||
caps.push_back("relations");
|
||||
caps.push_back("migrations");
|
||||
}
|
||||
|
||||
return caps;
|
||||
}
|
||||
|
||||
static bool supports(const std::string& adapter, const std::string& capability) {
|
||||
auto caps = detect(adapter);
|
||||
for (const auto& cap : caps) {
|
||||
if (cap == capability) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user