neo4j-contrib / neomodel

An Object Graph Mapper (OGM) for the Neo4j graph database.
https://neomodel.readthedocs.io
MIT License
936 stars 231 forks source link

feat(match): allow filtering by IN the ArrayProperty #784

Closed icapora closed 4 months ago

icapora commented 6 months ago

I improved the IN filter so that it supports correct usage with the ArrayProperty. I didn't want to make any radical changes. If you agree, I could implement what was suggested in some issues like https://github.com/neo4j-contrib/neomodel/issues/284 and https://github.com/neo4j-contrib/neomodel/issues/379 - the possibility of filtering by contains_values and/or exact_values.

sonarcloud[bot] commented 6 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

mariusconjeaud commented 4 months ago

Thank you for this work ! Sorry for leaving this waiting for so long, I have been deep into the implementation of async Python for neomodel.

Now that it's done, I'm reviewing the new PRs and trying to see what would fit into that release. So, give me some time to review your PR, but so far it looks good and interesting.

mariusconjeaud commented 4 months ago

Tested with the new async code (merged in rc/5.3.0) and it works just fine.

So I will merge this into a temp branch (rc/5.3.0-pre), so I can merge it back into the actual release candidate branch. This is because I otherwise need to just copy paste your code as the async and sync codebases are now split, and you won't be seen as a contributor anywhere :-)

Thanks for the great work, and for your help in making the code cleaner, adding docstrings, and writing a test for it !

icapora commented 4 months ago

First of all, thank you for taking the time to review it. I am very glad that the code has been useful, willing to continue contributing!!!

mariusconjeaud commented 4 months ago

Thanks ! I realize I did not answer about the possibility of extending filtering capabilities => that would definitely be appreciated.

I will soon close and release the 5.3.0 branch, which contains the code for async and sync, so it will make PRs and reviews easier again. That release will include a guide on how to develop in this async framework (basically, you only need to write code for the async part, and the pre-commit hook contains a transpiling method to create the sync equivalent).