3 ms·
I generate Typescript types from my database (https://github.com/kristiandupont/kanel https://github.com/kristiandupont/kanel) which gives me type safety on bac
by kristiandupont 6y ago
I generate Typescript types from my database (https://github.com/kristiandupont/kanel https://github.com/kristiandupont/kanel) which gives me type safety on back- and frontend without relying on an ORM. I am curious about Prisma but I don't see any advantage to it from my quick skimming.
- olso 6y agoWhat do you use to write the queries? Some query builder?
- nsonha 6y agoknex seems to be what everyone use, has a migration tool too
- kristiandupont 6y agoI use a home made library on top of Knex that is not open source yet. I will extract it from the Submotion code and release it as well, but I am not sure when.
- dmoose 6y agoI do the same using kanel. It's just enough to make the typings smooth without dictating anything else about how they are used. I prefer to write the queries directly in sql using pg-promise and then type the results of the query and the parameters of the query using the output of kanel. Any changes to the db result in generating new typings followed by running the tests to make sure nothing broke.