4 ms·
Looks pretty good. Looks like a good compromise between Prisma [1] and pure pg. Also the way you show examples is one of the best I've seen so far, with the ou
by phiresky 6y ago
Looks pretty good. Looks like a good compromise between Prisma [1] and pure pg.
Also the way you show examples is one of the best I've seen so far, with the output right below, optionally showing imports imports and the option to show it in a monaco editor with types.
Could you also compare it to Prisma and Mammoth [2]?
[1]: https://www.prisma.io/ https://www.prisma.io/
[2]: https://github.com/Ff00ff/mammoth https://github.com/Ff00ff/mammoth
- gmac 6y ago:) Happy that you noticed the thought that went into presenting the examples. I hadn't come across those other libraries. On Prisma, I think I agree with your assessment. A key thing that this and Prisma have in common is interrogating your DB to generate types. Zapatos is (almost) wholly limited to generating types, while it seems Prisma generates a bunch of code too. Prisma seems somewhat more like an ordinary ORM. It introduces more of its own terminology and abstractions, has its own ways of inserting into and querying related tables, and so on. At a glance, it looks nicely thought out. It has plans to become a SaaS of some sort. Mammoth, on the other hand, looks like it tries to solve a very similar problem to Zapatos, and gets there by providing a query builder. You define all your tables manually in code, and then write SQL through the medium of TypeScript.