4 ms·
> Any plans for Knex support? That question doesn't really make sense. I'm not familiar with this library, but the developer interface is very similar to sloni
by hn_throwaway_99 5y ago
> Any plans for Knex support?
That question doesn't really make sense. I'm not familiar with this library, but the developer interface is very similar to slonik. The whole point of this is that SQL tagged template literals replace the need for a query builder like Knex.
Here is a good blog post from the author of slonik explaining: https://gajus.medium.com/stop-using-knex-js-and-earn-30-bf410349856c https://gajus.medium.com/stop-using-knex-js-and-earn-30-bf41...
- deleted 5y ago[deleted]
- spiffytech 5y agoI'm broadly a fan of just writing SQL, but Knex does have one important advantage: it automatically declares the return types from a query based on my DB structure. If I write SQL by hand, I have to annotate the query with the return types, and those annotations can get out of sync with the query.
- hn_throwaway_99 5y agoSlonik has a typegen package that works great, https://www.npmjs.com/package/@slonik/typegen https://www.npmjs.com/package/@slonik/typegen
- whenlambo 5y agoPostgres.js does the same, transparently. No advantages of Knex here.