JAN
JAN

Reputation: 21865

PostgreSQL equivalent to MongoDB's Mongoose?

I'm using PostgreSQL for a project , and for that I need a SQL database.

Anyone knows what's PostgreSQL equivalent to MongoDB's Mongoose ?

Upvotes: 10

Views: 8085

Answers (4)

gideb
gideb

Reputation: 11

Here is a good article denoting some other ORM options for. JS: https://www.prisma.io/dataguide/database-tools/top-nodejs-orms-query-builders-and-database-libraries#prisma

In short:

  1. Sequelize (Most popular))
  2. Knex.js
  3. Bookshelf.js
  4. Objection.js
  5. TypeORM (TypeScript)

Upvotes: 0

user1767316
user1767316

Reputation: 3651

If you are looking for a way to convert JSONB typed columns into objects that you can load update and save like you do using mongoose:

The § "JSONB (PostgreSQL only)" type in the sequelize documentation will show you how.

node-postgres might be an alternative

Upvotes: 1

Matthew Gaiser
Matthew Gaiser

Reputation: 4773

It depends on what you are coding in. Mongoose is an ODM or object data modelling tool for Node.js.

Those object modelling tools are typically tied to a particular language or framework. In Java, one might use Hibernate. In Django, there is a custom ORM (swap data for relational). With Node, one might use a tool like Sequalize.

Sequalize is probably the answer you are looking for.

Upvotes: 4

Arslan Talib
Arslan Talib

Reputation: 123

you can try Sequelize for PostgreSQL

Upvotes: 5

Related Questions