harbor run -t datacurve/drizzle-orm-window-function-buildersharbor download datacurve/drizzle-orm-window-function-buildersThe existing sql template tag provides no type safety for window expressions, forcing hand-written strings for running totals or row rankings. These raw strings lose column type inference, bypass quoting, and require users to know dialect-specific syntax.
New public API: ranking helpers rowNumber, rank, denseRank, ntile, percentRank, cumeDist; offset helpers lag, lead, firstValue, lastValue, nthValue; aggregates windowSum, windowAvg, windowMin, windowMax, windowCount. Each helper returns a builder with a .over() method taking an inline spec or a string window name. The spec accepts partitionBy, orderBy, and frame; frame values are built via rows() or range() with a { from, to } boundary object using the constants unboundedPreceding, currentRow, unboundedFollowing or the functions preceding() and following().
IMPORTANT: Please work on this in a new branch from main and commit everything when you are done.