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

Feature idea: sending queries and getting results #82

Open
ftomassetti opened this issue Jul 24, 2024 · 2 comments
Open

Feature idea: sending queries and getting results #82

ftomassetti opened this issue Jul 24, 2024 · 2 comments

Comments

@ftomassetti
Copy link
Contributor

I think it would be an amazing feature to be able to send queries to the repository, have it perform them efficiently on the database, and get back a result.

For example, I need to check how many nodes of a given type have a certain reference set to null and how many have it set to something different than null.

To do that:

  • I first use one of the additional APIs that give me back the map classifier -> node IDs
  • I then retrieve all the nodes through their node IDs (with depth 1)
  • I do the counting on the client side

This takes ~5 minutes because I have 2,666 nodes of that type, and they have a very big string property. I think the query executed on the repository could be orders of magnitude faster.

I think we do not want these queries to be expressed directly in SQL, as it would mean exposing the schema to the client. Also, it may be risky and error-prone. So we would probably need to use or define a query language that is then translated into SQL, getting the result, and then translating it into a format convenient to the client (and independent from the current database schema).

This would probably be a very useful feature but also require quite some effort.

@enikao
Copy link

enikao commented Jul 24, 2024

I guess you're talking about LionWeb-io/specification#39 ?

@ftomassetti
Copy link
Contributor Author

I guess you're talking about LionWeb-io/specification#39 ?

Yes

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

No branches or pull requests

2 participants