-
-
Notifications
You must be signed in to change notification settings - Fork 499
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
Allow to change FROM
clause using QueryBuilder
#3374
Labels
enhancement
New feature or request
Comments
I hope you also plan to send some PRs, and not just a huge round of issues :] |
@B4nan I hope so, but I can't do this without your help 😄 |
derevnjuk
added a commit
to derevnjuk/mikro-orm
that referenced
this issue
Aug 9, 2022
derevnjuk
added a commit
to derevnjuk/mikro-orm
that referenced
this issue
Aug 9, 2022
derevnjuk
added a commit
to derevnjuk/mikro-orm
that referenced
this issue
Aug 9, 2022
derevnjuk
added a commit
to derevnjuk/mikro-orm
that referenced
this issue
Aug 9, 2022
derevnjuk
added a commit
to derevnjuk/mikro-orm
that referenced
this issue
Sep 9, 2022
derevnjuk
added a commit
to derevnjuk/mikro-orm
that referenced
this issue
Sep 9, 2022
derevnjuk
added a commit
to derevnjuk/mikro-orm
that referenced
this issue
Sep 9, 2022
derevnjuk
added a commit
to derevnjuk/mikro-orm
that referenced
this issue
Sep 9, 2022
derevnjuk
added a commit
to derevnjuk/mikro-orm
that referenced
this issue
Sep 9, 2022
derevnjuk
added a commit
to derevnjuk/mikro-orm
that referenced
this issue
Sep 9, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
As a user, I would like to have the ability to change/add
FROM
clause in which the entity's table select/update/delete will be executed.Motivation
For example, implementing the seek pagination with the ability to navigate to the previous page, you have to reverse the ordering of the result set (
ASC
vsDESC
) using the same predicate so that the results you want are to the right of the cursor:Currently, this is possible to do only using
knex.fromRaw()
, exposing the implementation details ofQueryBuilder
. What could be a issue from design perspective. As soon as the implementation of eitherQueryBuilder
orknex
is changed (e.g.mikro-orm
starts using a different query builder fromknex
), the user will have to rework a significant part of his code.Just by declaring a
from()
method, we are able to give the user a powerful mechanism to handle this without necessity to rely onknex
:Possible solution
The new method(s) can be introduced to be used to change/add
FROM
clause, removing all previously set from-s:The text was updated successfully, but these errors were encountered: