In essence I need the following query SELECT COUNT(*) FROM ... to read SELECT COUNT(*) OVER() FROM ... in order to get correct count results. I've been up and down the sources by now and see no way of achieving it with what's currently available. I can see this not being added to Esqueleto as it would open up a can of worms, so I wonder what options do I have at this point? The only thing I can think of is writing a view at db layer and then using that but that would come at the expense of losing type safety. Any help would be greatly appreciated :)
In essence I need the following query
SELECT COUNT(*) FROM ...
to readSELECT COUNT(*) OVER() FROM ...
in order to get correct count results. I've been up and down the sources by now and see no way of achieving it with what's currently available. I can see this not being added to Esqueleto as it would open up a can of worms, so I wonder what options do I have at this point? The only thing I can think of is writing a view at db layer and then using that but that would come at the expense of losing type safety. Any help would be greatly appreciated :)Edit: I am working with postgres.