Show HN: I made a free open-source TypeScript PostgreSQL ORM (github.com)

1 points by samhuk ↗ HN
Hey HN, this is my first post! For the last few months I have been creating a free and open-source ORM for Typescript and PostgreSQL: ts-pg-orm.

It's fully type-enforced and has support for complex queries, with auto-complete at every opportunity.

It's still quite early and mostly has been a hobby so far to learn about the deeply complex side of Typescript and to provide easy persistence for my own projects (it probably won't be big and professional like Prisma for a while).

2 comments

[ 4.5 ms ] story [ 16.3 ms ] thread
Great hobby, but why not spend time contributing to MikroORM instead?
Good question. There are quite a few packages that I have tried out: Prisma, TypeORM, MikroORM. There's probably more out there that I haven't tried. People love creating ORMs it seems!

When I was trying these out, they always has something missing, and it varied on the package.

* Something wouldn't be type-enforced (=> auto-completing) according to what fields my data model(s) have

* They wouldn't support paging on related data (that is a tricky one, requiring rather complex lateral joins

* They would expose a bit too much of their query plan framework to the user

* They would have their own "schema language" that required compiling (i.e. like Prisma), which I don't particularly agree with.

Most of the missing pieces were quite core to the ORM I felt. Because of that, I didn't want to go in and try to wrestle with their core architecture or principles, as I find that a low value-add to all parties. Instead, creating my own enabled me to put my own beliefs/style into an ORM and learn something in the process.

Thanks for your question.