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 Request for OVER clause [Window function ?] #475

Open
k03rdt6 opened this issue Mar 7, 2020 · 2 comments
Open

Feature Request for OVER clause [Window function ?] #475

k03rdt6 opened this issue Mar 7, 2020 · 2 comments
Labels

Comments

@k03rdt6
Copy link

k03rdt6 commented Mar 7, 2020

Hello mate
Is there a possibilty of OVER cluse support in Lib may be it already exist and I overlooked.
I was trying to achive my pagination logic and needed to use OVER cluase with limit.
my sql logic may be off in this regard but I was trying to achive something like this

select id,firstName,lastName,count(id) OVER() from user_profile order by id limit 50;

it just saves me trouble of writing seperate query for just a count when i add multiple conditions
I am pretty sure this could be achived by left join or somthin similar or I could be shootin blind here

cheers.

@fnc12
Copy link
Owner

fnc12 commented Mar 7, 2020

Hello. This is a good feature request cause WINDOW functions are very powerful but noone before requested it. Could you provide a query you desire to execute please? It will help me very much

@fnc12 fnc12 added the feature label Mar 7, 2020
@k03rdt6
Copy link
Author

k03rdt6 commented Mar 7, 2020

Thanks for quick reply
This is from test code if you want detailed one i can post that too but it would be bloated for this instance don't you think ?

select id,firstName,lastName,count(id) OVER() from user_profile where id >(:refId) and order by id limit (resultperpage);
Just a hunch it would not be possible to implement this feature in get_all because of class bindings and all

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

No branches or pull requests

2 participants