schema progress

This commit is contained in:
Sascha Kühl
2025-09-26 16:13:07 +02:00
parent 3ae2b003aa
commit d7758e827d
3 changed files with 35 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
#ifndef MATADOR_SCHEMA_HPP
#define MATADOR_SCHEMA_HPP
#include "matador/object/repository.hpp"
namespace matador::orm {
class schema {
public:
explicit schema(const std::string &name);
template<typename Type>
[[nodiscard]] utils::result<void, utils::error> attach(const std::string &name, const std::string &parent = "") {
return repo_.attach<Type>(name, parent);
}
template<typename Type, typename SuperType>
[[nodiscard]] utils::result<void, utils::error> attach(const std::string &name) {
return repo_.attach<Type, SuperType>(name);
}
private:
object::repository repo_;
};
}
#endif //MATADOR_SCHEMA_HPP