Skip to content
A Node.js driver for OrientDB using the OrientDB RESTful HTTP protocol
JavaScript
Branch: master
Clone or download
Havelaer Merge pull request #3 from davide/master
Support for gremlin commands
Latest commit b76a50b Oct 9, 2014
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config dumbed down driver Dec 5, 2013
lib
test
.gitignore
LICENSE Initial commit Aug 25, 2013
README.md
orientdb.js Submit commands via the HTTP body Jun 30, 2014
package.json

README.md

node-orientdb-http

A Node.js driver for OrientDB using the OrientDB RESTful HTTP protocol.

Very basic http wrapper using request and Q. Tested on OrientDb 1.6.1.

Install

npm install node-orientdb-http

Connect

var orientdb = require('node-orientdb-http');

var db = orientdb.connect({
    host: "http://localhost:2480",
    user: "admin",
    password: "admin",
    database: "test"
});

db.on('connect', function() {
    // yes! connected
});

db.on('error', function(err) {
    // mmm error ..
});

Play

See OrientDB-REST for more docs.

// general api
db.[get|post|put|delete](:command, :queryParams, :postBody).then(successHandler, errorHandler);

var d = { '@class': 'V', name: 'Robin'};
db.post('document', null, d).then(successHandler, errorHandler);

db.delete('document', '9:1').then(successHandler, errorHandler);

// or specific commands
db.command('insert into V set name = "Batman"').then(successHandler, errorHandler);

db.query('select * from V where name = "Batman"').then(successHandler, errorHandler);


db.language('gremlin').query("g.V('@class', 'User')").then(successHandler2, errorHandler2);

Changelog

0.1.1

  • encodeURIComponent for complexe request against OrientDB (@welcoMattic)

0.1.0

  • First Release
You can’t perform that action at this time.