This is a node.js driver for OrientDB using the OrientDB binary protocol. This driver is based on the latest version of OrientDB: 1.7.0.
npm install node-orientdb
As developer you should fork/clone this repo and once you have it on your machine, do the following in your repo directory:
npm install
The NodeJS OrientDB driver is almost mature, but we are still testing. While we use it in production already and therefore it implements a sufficient number of features for making a fully featured application, we recommend you make some thorough tests before you do it as well. If you find any problems, let us know such that we can improve things. Until version 1.0 we also don't guarantee any backwards compatibility and API stability since we are trying things out. But 1.0 should not be far from now.
We test each release with the most recent version of OrientDB. Although we try to remain backwards compatible, it may not be fully tested. If you experience any problems with an older version than the current, please inform us.
Overview of OrientDB and concepts:
To start using OrientDB, check out the following YouTube tutorials based on version 1.6.2:
var Orientdb = require('node-orientdb');
var Db = Orientdb.GraphDb;
var dbConfig = {
//Server
server_host:'localhost',
server_port:2424,
server_username:'admin',
server_password:'admin',
//Database
database_name:'test',
database_username:'admin',
database_password:'admin',
database_type: 'document', //Optional. Default: document.
database_storage: 'local' //Optional. Default: local.
};
var db = new Db(dbConfig);
db.open()
.then(function(results) {
//Details
console.log("Database '" + db.databaseName + "' has " + db.clusters.length + " clusters");
//SQL Statement
var sql = 'SELECT FROM Users';
var opts = {};
//Queries
db.query(sql, opts)
.then(function(results) {
console.log(results);
})
.error(function(error) {
console.log(error);
});
})
.error(function(error) {
console.log(error);
});
See ChangeLog
To see if your version of OrientDB supports a method, please see the compatibility list: Operation Types