-
Notifications
You must be signed in to change notification settings - Fork 46
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
A query language to get classes from model #48
Comments
Hi @mertserezli ! Thanks a lot for the idea! Indeed, it would be very great to have this feature into PyEcore. I try to start a student project on translation from OCL to Python that could provide a nice way of expressing queries on models. Regarding the queries and the hypotethical language, what are the expressions/constraints you need to express? If there is not so much complex queries, a first simple version could be easy to build. |
|
Got it, thatnks for the examples. Did these queries are 'frozen', I mean, do your users need to write the queries themselves of do you need to write the query, your users could select bag of elements (or the full model) and select one of your queries? (just to know, as Python is quite expressive, with few methods in the later case, it would be possible to have a quick and flexible framework). Sorry for all these questions. |
The users should write the queries. Those queries are not frozen. Expressiveness is important here. |
Ok, I got i, so it means that the user is familiar with the metamodel they will build the queries on. I'll keep this in mind and try to find a solution. |
@mertserezli I think use antlr4 + pyecore is pretty easy to add a query front end. I created one for our DSL model. |
I know this is an older post, but I might steer your attention towards Essential Object Query (EOQ): https://gitlab.com/eoq/essentialobjectquery and its Python implementation, which is based on pyecore: https://gitlab.com/eoq/py/pyeoq EOQ is a query and transaction system for domain-specific models, which solved most of our issues when working with complex-domain specific models. |
Wow! That's... just ... amazing! Thanks a lot for the links. I hesitate to put a section in the readme about projects using pyecore. Would it be ok if I list EOQ and the python implementation there? |
Please feel free to do so. The more people use EOQ, the better it (hopefully) becomes. |
Hello,
I am trying to build an UI for a project that uses pyecore. The users want to get classes by a query.
I would like that feature.
Thanks!
The text was updated successfully, but these errors were encountered: