Re:Deno 1.33: Deno 2 is coming
by lacasito25 on Saturday April 29, 2023 @04:53AM
(#35751267)
There's pgtyped, which I believe does almost the same as sqlc
Re:Deno 1.33: Deno 2 is coming
by jerrygenser on Saturday April 29, 2023 @08:17AM
(#35752195)
I was interested in looking up sqlc for python but it seems to be for go? Is there a different version than this? https://github.com/kyleconroy/sqlc
Re:Deno 1.33: Deno 2 is coming
by cropcirclbureau on Saturday April 29, 2023 @10:50AM
(#35753399)
They appear to have beta grade[0] support for Python and Kotlin. (TypeScript on the roadmap as well)
[0]: https://docs.sqlc.dev/en/latest/reference/language-support.h...
Re:Deno 1.33: Deno 2 is coming
by StefanWestfal on Saturday April 29, 2023 @05:36PM
(#35757453)
They put some work into the Python adoption and it is enough for smaller projects but I did not try it for to complex use cases. You can see it under examples.
What is nice is that you can set the option to parse into PyDantic rather the dataclasses.
For work I would need a good interface for SQL. In pet projects I am using sqlx for Rust and sqlc for Python. In both you can write SQL directly and get query validation and parsing into struct / PyDantic for free. Is there something like this for Deno?