kysely
kysely copied to clipboard
[Feature] Allow window function modification
Originally discussed in https://github.com/kysely-org/kysely/issues/397#issuecomment-1553177254. This would allow support for the frame spec of SQLite. As suggested by @igalklebanov in https://github.com/kysely-org/kysely/issues/397#issuecomment-1553239805 a new syntax .modifyEnd and .modifyFront could be added to OverBuilder to match SelectQueryBuilder syntax. For example an unbounded window would look something like this:
fn.over(qb =>
qb
.partitionBy("group")
.orderBy("order")
.modifyEnd(sql`ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING`)
)