schema creation progress
This commit is contained in:
@@ -30,4 +30,16 @@ utils::result<shadow_repository::node_ptr, utils::error> shadow_repository::atta
|
||||
utils::result<void, utils::error> shadow_repository::detach_node( const std::shared_ptr<repository_node>& node ) const {
|
||||
return repo_.detach(node);
|
||||
}
|
||||
}
|
||||
|
||||
bool shadow_repository::expecting_relation_node(const std::string &name) const {
|
||||
return repo_.expecting_relation_node(name);
|
||||
}
|
||||
|
||||
void shadow_repository::expect_relation_node(const std::string &name, const std::type_index &ti) const {
|
||||
repo_.expect_relation_node(name, ti);
|
||||
}
|
||||
|
||||
void shadow_repository::remove_expected_relation_node(const std::string &name) const {
|
||||
repo_.remove_expected_relation_node(name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,15 +30,15 @@ std::shared_ptr<repository_node> relation_endpoint::node_ptr() const {
|
||||
}
|
||||
|
||||
bool relation_endpoint::is_has_one() const {
|
||||
return type_ == relation_type::HAS_ONE;
|
||||
return type_ == relation_type::HasOne;
|
||||
}
|
||||
|
||||
bool relation_endpoint::is_has_many() const {
|
||||
return type_ == relation_type::HAS_MANY;
|
||||
return type_ == relation_type::HasMany;
|
||||
}
|
||||
|
||||
bool relation_endpoint::is_belongs_to() const {
|
||||
return type_ == relation_type::BELONGS_TO;
|
||||
return type_ == relation_type::BelongsTo;
|
||||
}
|
||||
|
||||
std::shared_ptr<relation_endpoint> relation_endpoint::foreign_endpoint() const {
|
||||
|
||||
@@ -206,6 +206,10 @@ bool repository::expecting_relation_node( const std::string& name ) const {
|
||||
return expected_relation_nodes_.count(name) > 0;
|
||||
}
|
||||
|
||||
void repository::expect_relation_node(const std::string &name, const std::type_index &ti) {
|
||||
expected_relation_nodes_.insert({name, ti});
|
||||
}
|
||||
|
||||
void repository::remove_expected_relation_node( const std::string& name ) {
|
||||
expected_relation_nodes_.erase(name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user