-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide an easy way to check whether a cuds object has certain connections #612
Comments
Related to #418 |
Do you want to check if two instances are connected, or if one instance is connected to instances of a certain type? |
For this we have the |
Then I could rename the issue, since you are not looking for connection to another cuds object specifically |
I think some relevant methods would be (naming of the methods as a draft): cuds_object.is_connected(rel=..., oclass=...) # Check whether cuds_object is connected given the filters
cuds_object.count_connections(rel=..., oclass=...) # Count the connections from cuds_object given the filters
cuds_object.get_unique(rel=..., oclass=...) # Returns one object when only one matches the filters, exception otherwise |
We may want to add a |
When a user wants to check if a cuds object is connected to another, then he has to use
get
oritem
with an additional condition to make the check.get
is also inefficient if it results in bringing cuds objects from the backend that are not used.Could be useful to have a more intuitive method for this. For example,
count
with filter options.The text was updated successfully, but these errors were encountered: