This makes possible to write SQL by hand in cases where you need
something complex like that:
(mito.dao:select-by-sql
'top-item
"SELECT * FROM (
SELECT score.*,
row_number() OVER (ORDER BY total DESC) AS position
FROM score
) AS t
WHERE position > ?
ORDER BY position
LIMIT ?"
:binds (list (- user-position
(floor (/ limit 2)))
limit))
Coverage decreased (-0.03%) to 71.751% when pulling ae2da11980d9718307869808a901ac6158fc0856 on svetlyak40wt:select-by-sql-with-binds into be0ea57df921aa1beb2045b50a8c2e2e4f8b8955 on fukamachi:master.
This makes possible to write SQL by hand in cases where you need something complex like that: