-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Updated MongoDB/Panache parser to latest ORM parser #38751
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
For primitive types, I'm surprised it didn't worked and nobody complained. We should add tests for them and see what happens, we can add them later.
Not sure if this is my fault, I guess it must be. Do you have any idea how to run these tests locally on recent machines? Ones without old libssl versions? |
This comment has been minimized.
This comment has been minimized.
Tests runs on my machine so I cannot help you on that. |
I suppose it's due to something like this? flapdoodle-oss/de.flapdoodle.embed.mongo#451 |
It may. To test you can also launch locally and use testcontainers or start a MongoDB via Docker. |
Looks like |
You can switch locally to 6 by updating the |
Yeah, except the But it works, I can reproduce now. |
So, we have a query of the form We have several choices here, like ask people to quote those identifiers/functions if they want to use them as attributes: Or we can declare we'll never use them, and turn these functions into identifiers, as was the case before. WDYT? |
Actually, I see |
So it is backticks. |
I'm afraid that if we ask users to quote what was not needed before it may break existing code. If we can avoid that it will be better as it's anyway useless for MongoDB where all functions starts with $. |
OK, let me remove those keywords then. They do seem useful, though, given that they provide access to the current time. But whatever, not my problem ;) |
This way, we keep it up to date, because the previous version was a pre-release of ORM 5-6. This required some visitor changes, and in particular there's a precedence change between 'and/or' expresions who now require paren grouping. Also, literals are not implemented correctly: only strings are supported but this was already the case: tests do not test other literals.
Because they are global and can only be configured at one place
ae57329
to
d19c93b
Compare
I did fix this bug, but tests still fail, though I suspect this may be due to mongo V6 because I don't see any query issue. So let's see what CI says. |
Status for workflow
|
Well, CI says it's fine for V4. I should probably open an issue to see why the tests don't run in V6, no? |
I would say wait for someone to complain 🙈 But yes, something may have changed |
🤷 |
This way, we keep it up to date, because the previous version was a pre-release of ORM 5-6.
This required some visitor changes, and in particular there's a precedence change between 'and/or' expresions who now require paren grouping.
Also, literals are not implemented correctly: only strings are supported but this was already the case: tests do not test other literals.
I could not run the tests locally, due to an outdated libssl requirement of flapdoodle. Hopefully CI will get it running.