MaterializeInc / materialize

The Cloud Operational Data Store: use SQL to transform, deliver, and act on fast-changing data.
https://materialize.com
Other
5.71k stars 466 forks source link

Improved Kysely Support #19867

Open RobinClowers opened 1 year ago

RobinClowers commented 1 year ago

Feature request

I've recently started using Kysely to generate type checked Materialize queries. I'm filing this to track any issues that come up. I'll also track any issue with kysely-codegen here.

So far the only issue I've had to work around is lack of support for parameters in the limit clause. When adding a limit, Kysely automatically parametrizes the clause, which fails in Materialize. Luckily I was able to work around this by building a limit clause with the sql template string and including the limit as a raw value.

### Outstanding issues
- [ ] LIMIT does not accept parameters
- [ ] HAVING does not accept parameters
RobinClowers commented 1 year ago

Another issue in the same category, the HAVING clause also doesn't seem to accept parameters.

benesch commented 1 year ago

Thanks, @RobinClowers, this is perfect!

cc @morsapaes and @MaterializeInc/devex for tracking on their integrations board