schema progress
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user