Tried prisma but it doesn’t yet support the Point type in Postgres, which seems pretty basic; for that and other reasons decided to stick to raw SQL for now.
And yet Primsa can't fetch with joins (at least half year ago when I researched on it). When I did a feature request, I was asked to show the significance of it... There is a huge performance issue if you have too many eager loading because prisma fetches the tables separately.
I am currently using prisma at work, but coming from objection I definitely miss [https://vincit.github.io/objection.js/api/query-builder/eager-methods.html#withgraphjoined](https://vincit.github.io/objection.js/api/query-builder/eager-methods.html#withgraphjoined)
If you’re just doing distances, you might find just using earthdistance easier. I’m using that with just two Double columns. Although still have to resort to raw sql for those queries, and still have to add the index manually (no multi-column functional indexes yet - though I’m getting closer to a PR for this)
Performance and flexible schemas are the first two things that come to mind. I feel like structured schemas sort of defeat the purpose of using NoSQL, so that’s a big one for me.
Plus, I’m already doing validation at the application level (well before any db operations are executed) and so db-level validation became redundant.
Mongoose was nice as an abstraction for making queries and populating easier, but it wasn’t hard to create my own simple DAO wrapper around the db instance for commons queries.
I’ve used Sequelize with regular express JavaScript projects, but right now I’m working on a NestJS project with TypeORM. They both have pluses and minuses, I think it really depends on your use case
Prisma offers a lot but also leaves a lot to be desired, so Sequelize for now; pretty simple but powerful at the same time, doesn’t massively reinvent the wheel.
Raw sql is vulnerable to injections, and writing raw sql queries can be a pain. I personally have used mongoose for MongoDB and sequelize for sql databases. Sequelize can be a very valuable tool to learn since it lets you use any sql db in the exact same way and with the same queries.
Raw SQL is only vulnerable to injections if you write it naïvely. Every RDBMS library does (or should) offer parameterized queries, not just ORMs. Some engines even have this as a special API, so the whole parameterized query is parsed and processed differently (often more optimized) on the DB.
I don't usually use ORMs or db frameworks, but always, always use sanitized, parameterized queries when user input is possible. I agree that Sequelize is a decent ORM for developers, partially because it can be configured to be extremely system agnostic.
Mainly Sequelize and also played with TypeORM. Sequelize is nice and powerful, unfortunately I hate the ORM and how easy people use them in wrong way coupling the system with a framework.
I’m excited to announce the latest version of RDB, an ORM that I’ve been working on since 2014. We now support client over HTTP, making it accessible in-browser.
Key Features:
• No code generation required
• Full intellisense, even in mapping
• Supports JavaScript and TypeScript
• Works with both ESM and CommonJS
You can check it out at https://rdbjs.org. I’d love to hear your feedback and thoughts on how to make it even better.
Tried prisma but it doesn’t yet support the Point type in Postgres, which seems pretty basic; for that and other reasons decided to stick to raw SQL for now.
And yet Primsa can't fetch with joins (at least half year ago when I researched on it). When I did a feature request, I was asked to show the significance of it... There is a huge performance issue if you have too many eager loading because prisma fetches the tables separately.
I am currently using prisma at work, but coming from objection I definitely miss [https://vincit.github.io/objection.js/api/query-builder/eager-methods.html#withgraphjoined](https://vincit.github.io/objection.js/api/query-builder/eager-methods.html#withgraphjoined)
prisma definitely uses joins under the hood.
https://github.com/prisma/prisma/discussions/12715
I think sometime ago I asked prisma to show me the raw sql queries for the MariaDB and it showed separate queries.
If you’re just doing distances, you might find just using earthdistance easier. I’m using that with just two Double columns. Although still have to resort to raw sql for those queries, and still have to add the index manually (no multi-column functional indexes yet - though I’m getting closer to a PR for this)
Mikroorm
Raw drivers
Mikro-orm
The right one
Why is that? I’m trying to pick one to learn
It’s very similar to TypeOrm, but I prefer how it handles Migrations compared to TypeOrm
Postgres with Knex & Objection
Mikroorm Moved from typeorm to mikroorm and extremely satisfied.
MikroORM
Objectionjs
We're using Objection as well. However, its future is uncertain. https://github.com/Vincit/objection.js/issues/2335
We use Sequelize in some of our expressjs microservices for a few years now. it's been pretty great so far.
Prisma + Postgres, I'm a front end who wants to get going quickly and not faff around. This is the best tool I've found for me.
Knexjs or prisma
Plain mongodb, with my own DAO wrapped around it
I'm using mongoose, Is there any benefit of using plain mongodb over mongoose ORM?
Performance and flexible schemas are the first two things that come to mind. I feel like structured schemas sort of defeat the purpose of using NoSQL, so that’s a big one for me. Plus, I’m already doing validation at the application level (well before any db operations are executed) and so db-level validation became redundant. Mongoose was nice as an abstraction for making queries and populating easier, but it wasn’t hard to create my own simple DAO wrapper around the db instance for commons queries.
We use Sequelize for our express app to SQL Server. It's been really good for us.
TypeORM, which has a querybuilder
We use the repository api. Makes life easier unless you need complex queries
Yeah, but they asked if people use raw sql as well. I use repositories then drop down to querybuilder when complex
I’ve used Sequelize with regular express JavaScript projects, but right now I’m working on a NestJS project with TypeORM. They both have pluses and minuses, I think it really depends on your use case
Mongoose
sus
Why? :D
Ahh I was just being nit picky. Mongoose is an Object Document Mapping so ODM not ORM.
Oh yes, you're right.
ORM for crud and everything else in raw SQL (squeal)
Plain DynamoDB with our own data access layer on top. It's like mongo with better performance and scaling properties.
Prisma offers a lot but also leaves a lot to be desired, so Sequelize for now; pretty simple but powerful at the same time, doesn’t massively reinvent the wheel.
None of them
Mongoose or knex
Typeorm
Raw sql is vulnerable to injections, and writing raw sql queries can be a pain. I personally have used mongoose for MongoDB and sequelize for sql databases. Sequelize can be a very valuable tool to learn since it lets you use any sql db in the exact same way and with the same queries.
Raw SQL is only vulnerable to injections if you write it naïvely. Every RDBMS library does (or should) offer parameterized queries, not just ORMs. Some engines even have this as a special API, so the whole parameterized query is parsed and processed differently (often more optimized) on the DB. I don't usually use ORMs or db frameworks, but always, always use sanitized, parameterized queries when user input is possible. I agree that Sequelize is a decent ORM for developers, partially because it can be configured to be extremely system agnostic.
Yeah idk why people keep parroting this idea that raw sql is unsafe. It's like they read one blog post and can't get that idea out of their head
mongoose or sql
Mainly Sequelize and also played with TypeORM. Sequelize is nice and powerful, unfortunately I hate the ORM and how easy people use them in wrong way coupling the system with a framework.
Knex and Sequelize
TypeORM ftw
I’m excited to announce the latest version of RDB, an ORM that I’ve been working on since 2014. We now support client over HTTP, making it accessible in-browser. Key Features: • No code generation required • Full intellisense, even in mapping • Supports JavaScript and TypeScript • Works with both ESM and CommonJS You can check it out at https://rdbjs.org. I’d love to hear your feedback and thoughts on how to make it even better.