relation completer progress
This commit is contained in:
@@ -43,21 +43,21 @@ std::shared_ptr<attribute_definition> basic_object_info::reference_column() cons
|
||||
return pk_column_;
|
||||
}
|
||||
|
||||
void basic_object_info::register_relation_endpoint(const std::type_index &tindex, const relation_endpoint &endpoint) {
|
||||
relation_endpoints_.insert(std::make_pair(tindex, endpoint));
|
||||
void basic_object_info::register_relation_endpoint(const std::type_index &type, const relation_endpoint &endpoint) {
|
||||
relation_endpoints_.insert(std::make_pair(type, endpoint));
|
||||
}
|
||||
|
||||
void basic_object_info::unregister_relation_endpoint(const std::type_index &tindex) {
|
||||
relation_endpoints_.erase(tindex);
|
||||
void basic_object_info::unregister_relation_endpoint(const std::type_index &type) {
|
||||
relation_endpoints_.erase(type);
|
||||
}
|
||||
|
||||
basic_object_info::const_endpoint_iterator
|
||||
basic_object_info::find_relation_endpoint(const std::type_index &tindex) const {
|
||||
return relation_endpoints_.find(tindex);
|
||||
basic_object_info::find_relation_endpoint(const std::type_index &type) const {
|
||||
return relation_endpoints_.find(type);
|
||||
}
|
||||
|
||||
basic_object_info::endpoint_iterator basic_object_info::find_relation_endpoint(const std::type_index &tindex) {
|
||||
return relation_endpoints_.find(tindex);
|
||||
basic_object_info::endpoint_iterator basic_object_info::find_relation_endpoint(const std::type_index &type) {
|
||||
return relation_endpoints_.find(type);
|
||||
}
|
||||
|
||||
basic_object_info::const_endpoint_iterator basic_object_info::find_relation_endpoint(const std::string &field) const {
|
||||
|
||||
@@ -18,4 +18,16 @@ relation_type relation_endpoint::type() const {
|
||||
const schema_node &relation_endpoint::node() const {
|
||||
return *node_;
|
||||
}
|
||||
}
|
||||
|
||||
bool relation_endpoint::is_has_one() const {
|
||||
return type_ == relation_type::HAS_ONE;
|
||||
}
|
||||
|
||||
bool relation_endpoint::is_has_many() const {
|
||||
return type_ == relation_type::HAS_MANY;
|
||||
}
|
||||
|
||||
bool relation_endpoint::is_belongs_to() const {
|
||||
return type_ == relation_type::BELONGS_TO;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user