This ORM Works only for iCOne Systems. PLease, use Total.js Version for free.
Node Database Management System (ORM)
Initialization
- installation
$ npm install dbms
- install MySQL:
$ npm install mysql2
- install PostgreSQL:
$ npm install pg
- install MongoDB:
$ npm install mongodb
const dbms = require('dbms');
dbms.init([alias], connection_string);
dbms.init('postgresql://user:pass@localhost:5432/dbname');
dbms.init('mypg', 'postgresql://user:pass@localhost:5432/dbname');
dbms.init('mysql://user:pass@localhost:3306/dbname');
dbms.init('mysql', 'mysql://user:pass@localhost:3306/dbname');
dbms.init('nosql');
dbms.init('mynosql', 'nosql');
dbms.init('table');
dbms.init('mytable', 'nosql');
Usage
var db = DBMS();
db.find('collection_table_name');
db.find('mypg/collection_table_name');
db.find('mynosql/collection_table_name');
db.find('mytable/collection_table_name');
db.one('collection_table_name');
db.one('mypg/collection_table_name');
db.one('mynosql/collection_table_name');
db.one('mytable/collection_table_name');
db.insert('collection_table_name', document, [unique]);
db.insert('mypg/collection_table_name', document, [unique]);
db.insert('mynosql/collection_table_name', document, [unique]);
db.insert('mytable/collection_table_name', document, [unique]);
Contact