-
Notifications
You must be signed in to change notification settings - Fork 43
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
Added Object Query Language #553
Conversation
Thanks! I think it's always good to have multiple options to choose from, so I would be happy to include this even if there is overlap with GQL. Just some comments:
|
@DavidMStraub, thanks for looking this over!
Good catch... I'll add that.
There are unit tests here: https://github.com/dsblank/pythonish-ql/tree/main/tests that are based on yours. Do you mean something other than that?
Ha, no I don't like it. Let me revise that. :) |
I think I have addressed all of the above, now with a new name |
object_ql now supports a security infrastructure, and resource limitations. Updated minimum version to 0.1.2. |
Great, thanks! The only thing that's missing is some simple unit tests that the query with oql works as expected. For GQL, I was lazy and just added a couple of cases in |
I'll finish this up with tests. But now that it is looking like we'll have a nice json repr, the prospect of having a query language that looks like python but queries like SQL is possible. Next challenge! |
This PR adds a Python Object Query Language to the gramps-web-api. This allows using standard Python on Gramps primary objects. This is based on @DavidMStraub 's "Gramps Query Language".
The QL lives here: https://github.com/dsblank/object-ql and can work on any Python objects. It contains adopted copies of the GQL tests, and should be a drop-in replacement for GQL.
Example queries include:
Find the person with a particular gramps_id:
Find all of the people with notes:
Find all of the people with notes that mention 'vote':
If you don't know what the type is, you can use obj, like: