renamed schema to repository

This commit is contained in:
Sascha Kühl
2025-08-28 16:12:26 +02:00
parent cce7f2c099
commit 3ae2b003aa
45 changed files with 823 additions and 823 deletions
@@ -1,8 +1,8 @@
#ifndef FOREIGN_NODE_COMPLETER_HPP
#define FOREIGN_NODE_COMPLETER_HPP
#include "matador/object/internal/shadow_schema.hpp"
#include "matador/object/schema_node.hpp"
#include "matador/object/internal/shadow_repository.hpp"
#include "matador/object/repository_node.hpp"
#include "matador/object/join_columns_collector.hpp"
#include "matador/object/object_ptr.hpp"
@@ -21,12 +21,12 @@ namespace matador::object {
*/
class foreign_node_completer final {
private:
using node_ptr = std::shared_ptr<schema_node>;
using node_ptr = std::shared_ptr<repository_node>;
public:
template<class Type>
static void complete(const std::shared_ptr<schema_node> &node) {
internal::shadow_schema shadow(node->schema_);
static void complete(const std::shared_ptr<repository_node> &node) {
internal::shadow_repository shadow(node->repo_);
foreign_node_completer completer(shadow);
completer.complete_node<Type>(node);
@@ -56,10 +56,10 @@ public:
void on_has_many_to_many(const char *id, CollectionType &collection, const utils::foreign_attributes &attr);
private:
explicit foreign_node_completer(internal::shadow_schema &shadow);
explicit foreign_node_completer(internal::shadow_repository &shadow);
template<typename Type>
void complete_node(const std::shared_ptr<schema_node> &node) {
void complete_node(const std::shared_ptr<repository_node> &node) {
nodes_.push(node);
Type obj;
@@ -69,17 +69,17 @@ private:
template<typename Type>
void attach_node() {
if (schema_.schema_contains(typeid(Type))) {
if (repo_.contains(typeid(Type))) {
return;
}
const auto node = schema_node::make_node<Type>(schema_.schema(), "");
if (auto result = schema_.attach_node(node)) {
const auto node = repository_node::make_node<Type>(repo_.repo(), "");
if (auto result = repo_.attach_node(node)) {
complete<Type>(result.value());
}
}
private:
std::stack<node_ptr> nodes_;
internal::shadow_schema &schema_;
internal::shadow_repository &repo_;
logger::logger log_;
join_columns_collector join_columns_collector_{};
};