Skip to content
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

Efficient filtering of retrieved cuds objects from backend #422

Open
yoavnash opened this issue Jul 2, 2020 · 2 comments
Open

Efficient filtering of retrieved cuds objects from backend #422

yoavnash opened this issue Jul 2, 2020 · 2 comments

Comments

@yoavnash
Copy link
Member

yoavnash commented Jul 2, 2020

Currently, to retrieve cuds objects and filter them by using some condition on the data attributes, I use this line of code:

cuds_object = next((c for c in wrapper.session.load_by_oclass(onto.my_oclass) if c.label == 'some_label'), None)

This code does the filtering in code rather than inside the database which is clearly inefficient.

@urbanmatthias
Copy link
Member

This is related to #177 isnt it?

@urbanmatthias
Copy link
Member

How would you allow the user to do this filtering api wise?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants