I'm pretty new to node, and I was wondering if there's any standard, open, API that could abstract me away from all the different database idiosyncrasies.
Any link with tutorials or documentation would be pretty much welcome indeed.
There's not a "standard" db abstraction layer for Node, but take a look at Node-DBI which is open-source and maintained on GitHub. There are probably others but this one has a good interface and several adapters already.
I think node-jdbc is a comprehensive module which is frequently being updated. Its documents are accessible on github as well.
Not exactly, 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. It's a full enterprise-grade framework, so has a lot of other components as well. Other frameworks like Sails.js have similar components.
Sequelize is a great ORM for PostgreSQL, MySQL, SQLite and MSSQL.
TypeORM is also great and supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.
There are none that I know of, and looking at the official node documentation doesn't list anything of the sort, which is disappointing.
If you're not opposed to using an ORM then Sequelize is a pretty good option, it only handles a subset of SQL, but it . This Project looks like an effort to do what you described; however, that project looks like it was last updated a long while ago.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With