What is equivalent to jpa or jdbc for node?

I am new to node, and I was wondering if there is any standard, open, api, which could distract me from all the different features of the database.

Any link with tutorials or documentation will pretty much welcome really

+11
source share
5 answers

There is no β€œstandard” db abstraction level for Node, but take a look at Node-DBI , which is open source and supported on GitHub. There may be others, but this one already has a good interface and several adapters.

+4
source

I think node-jdbc is a comprehensive module that is updated frequently. His docs are also available on github.

+3
source

There are no ones that I know of, and looking at the official node documentation nothing like this is listed, disappointment.

If you don't mind using ORM, then Sequelize is a pretty good option; it only handles a subset of SQL, but that is. This project looks like an attempt to do what you described; however, this project looks like it was the last updated a long time ago.

+2
source

Not really, but the Loopback Framework for Node.js has ORM-like data source connectors that allow you to connect to many data sources through a common syntax. This is a full-fledged enterprise-level infrastructure, so there are many other components. Other frameworks such as Sails.js have similar components.

Sequelize is an excellent ORM for PostgreSQL, MySQL, SQLite, and MSSQL.

+1
source

Although knex doesn't exactly look like JDBC or JPA, it seems like a good SQL abstraction on top of multiple databases.

Knex.js is a battery-powered SQL query builder for Postgres, MSSQL, MySQL,> MariaDB, SQLite3, Oracle, and Amazon Redshift, designed for flexibility, portability, and usability.

I really haven't used this, but given the desert landscape, this seems like a good option.

0
source

All Articles