jet icon indicating copy to clipboard operation
jet copied to clipboard

Support `FETCH {N} ROWS WITH TIES` for PostgreSQL

Open mingxiang-colorkrew opened this issue 1 year ago • 1 comments
trafficstars

Is your feature request related to a problem? Please describe. I would like to be able to use the FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } { ONLY | WITH TIES } functionality in PostgreSQL 13+ onwards with Jet. Currently this keyword is not supported by Jet. https://www.postgresql.org/docs/16/sql-select.html Screenshot 2023-12-15 at 22 05 00

Describe the solution you'd like Ideally it would be an official supported extension to the SelectStatement so we can compose it in a similar manner to other statements. Alternatively, it would be nice to have an official way to append statements not yet supported by Jet, though I'm not sure what form this could take.

Currently I am working around it by exporting the current statement using stmt.Sql() and appending to the string directly, would like some guidance on what would be the preferred approach for this kind of thing.

mingxiang-colorkrew avatar Dec 15 '23 13:12 mingxiang-colorkrew

Currently I am working around it by exporting the current statement using stmt.Sql() and appending to the string directly, would like some guidance on what would be the preferred approach for this kind of thing.

I don't see the other way around, except writing the whole query as raw statement.

houtn11 avatar Dec 16 '23 15:12 houtn11

FETCH_FIRST/FETCH_LAST WITH TIES support added in Release v2.11.0.

go-jet avatar Feb 28 '24 13:02 go-jet