3 ms·
We're using a very similar lib for typescript: https://github.com/adelsz/pgtyped https://github.com/adelsz/pgtyped Would love to hear if any others of comparab
by forrest2 5y ago
We're using a very similar lib for typescript: https://github.com/adelsz/pgtyped https://github.com/adelsz/pgtyped
Would love to hear if any others of comparable or better quality exist for js/ts
- CapriciousCptl 5y agoPersonally, I tried pgtyped in a greenfield project but ended up switching to Slonik. Both are brilliant packages-- if you ever peak at the source of pgtyped it basically parses SQL on its own from what I could understand. The issues I had were-- 1) writing queries sometimes felt a little contrived in order to prevent multiple roundtrips to the database and back and 2) pgtyped gave weird/non-functioning types from some more complex queries. I've had better luck with Slonik and just writing types by hand.