Blueprint for any weaver-connector
- connector = new WeaverConnector({ops})
- connector.getServerName()
- connector.getServerVersion()
- connector.transaction()
- connector.query()
- connector.transaction().then(function (trx) { ... })
- trx.createObject({obj}, [props]).then(...
- trx.createProperty({prop}).then(...
- trx.readObject(id).then(function (object) { ... })
- trx.readProperty(id).then(function (property) { ... })
- trx.updateObject({obj}, [props]).then(...
- trx.updateProperty({prop}).then(...
- trx.deleteObject(id).then(...
- trx.deleteProperty(id).then(...
- trx.commit().then(...
- trx.rollback().then(...
- connector.query().then(function (query) { ... })
- query.select('rel1', 'rel2')
- query.filter([filters])
- query.equalTo('rel1', 'value')
- query.linksTo('rel1', 'toId')
- query.ascending('rel1')
- query.descending('rel1')
- query.limit(limit)
- query.skip(skip)
- query.find().then(function (result) { ... })
- query.first().then(function (row) { ... })
- query.count().then(function (number) { ... })
var virtuoso = new Virtuoso({host: 'http://192.168.99.100', port: 1111, user: 'dba', passwd: 'dba' });
virtuoso.transaction().then(function (trx) {
trx.createObject({id: 'cim6eepaw00003j6gcjo236lm',
dataset: 'cim6ef9tk00003j6g5udpgi4l',
created: '1458831225'},
[])
.then(function() {
trx.commit();
});
});