Combine data and count queries into one (#253)

* combine data and count queries using count(*) OVER()

Instead of executing two separate queries (one for data, one for count),
add count(*) OVER() as the last column in all query variants. Extract
the count from the first row's last column and strip it from results.

This removes ~55 lines of code including:
- countQuery field from QueryComponents
- Separate count query generation logic
- queryCount helper function

* Auto-format code with fourmolu

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Anthony Alaribe 2025-12-31 23:13:39 +01:00 • committed by GitHub
commit 7b9515cb96
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 73 deletions