News for hackers. Stuff that matters.
Re:Show HN: ORM for TypeScript with no query-builder, suppor... by twodave on Thursday September 03, 2020 @09:33AM (#24363850)
OP's project is a little more opinionated than Dapper in that it defines repositories and whatnot. Dapper's more like just a set of query extensions that support basic object mapping. I love it personally, but I wouldn't even call it a micro-ORM.
Re:Show HN: ORM for TypeScript with no query-builder, suppor... by exevp on Thursday September 03, 2020 @09:40AM (#24363923)
It might be a good idea to focus on the use of template strings for safe and handy SQL generation instead of introducing too many opinionated ORM concepts.

If one had to, i'd separate these things in different libraries and let the developer opt in to what he needs.

Re:Show HN: ORM for TypeScript with no query-builder, suppor... by __ryan__ on Thursday September 03, 2020 @10:11AM (#24364215)
Thankfully [0], it [1] already [2] exists. [3]

[0] https://github.com/gajus/slonik-sql-tag-raw

[1] https://github.com/felixfbecker/node-sql-template-strings

[2] https://github.com/blakeembrey/sql-template-tag

[3] https://www.npmjs.com/search?q=sql%20template

Edit: When I first read your comment, I thought you were saying that you wanted a separate library just to have the SQL template functionality.

I agree with what you're saying though.

Re:Show HN: ORM for TypeScript with no query-builder, suppor... by Seb-C on Thursday September 03, 2020 @10:04AM (#24364142)
That is something I seriously considered, but I just did not want to bother with multiple packages and repositories, especially for a repository class that is about 150 lines of code.

The repository class that I provide is a very basic and handy abstraction for the 4 basic CRUD operations, but ultimately the goal is to write your own queries and repositories.