20 lines
568 B
C++
20 lines
568 B
C++
#ifndef MATADOR_DATABASE_HPP
|
|
#define MATADOR_DATABASE_HPP
|
|
|
|
#include "matador/query/schema.hpp"
|
|
#include "matador/utils/result.hpp"
|
|
#include "matador/utils/error.hpp"
|
|
|
|
namespace matador::query {
|
|
class database final {
|
|
public:
|
|
utils::result<void, utils::error> add(const std::string &name, const schema &schema);
|
|
utils::result<void, utils::error> remove(const std::string &name);
|
|
|
|
[[nodiscard]] utils::result<schema_ref, utils::error> get(const std::string &name);
|
|
|
|
private:
|
|
std::unordered_map<std::string, schema> schema_map_;
|
|
};
|
|
}
|
|
#endif //MATADOR_DATABASE_HPP
|