chaisql / chai

Modern embedded SQL database
MIT License
1.56k stars 95 forks source link

LIMIT and OFFSET should support expressions #463

Closed asdine closed 1 year ago

asdine commented 2 years ago

Even though it is technically possible to pass expressions to LIMIT and OFFSET, the docs.Take and docs.Skip operators expect integers, which doesn't make them very flexible.

The docs.Take and docs.Skip operators should take an expression instead of an integer, evaluate the expression and cast it to integer.

asdine commented 1 year ago

Fixed by https://github.com/genjidb/genji/commit/6178d1acfb341950f83631a48132fde3b78382bf