-
Notifications
You must be signed in to change notification settings - Fork 235
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
Proposal to filter on generic cypher expression #343
Comments
@stevenvdr I have a similar situation where I want to fetch ordered objects by a given list of custom uuids. |
I've found the snippet that I posted to be the easiest solution. There might be other ways, but I haven't checked as the snippet did what I needed (which was sort by distance to a certain point) |
@stevenvdr thanks for the advice! I think I will start implementing an extended QueryBuilder, too. |
@stevenvdr , @oikonomou Any updates on this? |
@owinogradow Could this be interesting to extend what you did on the ordering in the extension ? |
For a project I wanted to order my nodes based on the distance from a certain point. For realising this in neomodel I have created my own NodeSet and QueryBuilder to support this. Is this functionality that would be wanted in the neomodel package. If so I could create a Pull request for this.
Below is the snippet to support a new function
order_by_cypher
that allows to use any cypher expression to use in order_by. The NodeSet adds the cypher expression toself._order_by
after which it is picked up by the QueryBuilder when doingbuild_order_by
(if the property exists on the model it will use the previous behaviour, if not it will use the cypher literal).The text was updated successfully, but these errors were encountered: