express-cassandra
Advanced tools
Comparing version 1.5.0 to 1.6.0
@@ -15,4 +15,5 @@ # Welcome to Express Cassandra | ||
* support for before and after hook functions for save/update/delete | ||
* builtin experimental support for automatic migrations | ||
* built-in experimental support for automatic migrations | ||
* built-in promise support with Async suffixed functions | ||
This module uses datastax [dse-driver](https://github.com/datastax/nodejs-driver-dse) which is based on the official [cassandra-driver](https://github.com/datastax/nodejs-driver) for node. The dse driver is used so that both apache-cassandra and datastax enterprise users can use this module. Some of the base orm features are wrapper over a highly modified version of [apollo-cassandra](https://github.com/3logic/apollo-cassandra) module. The modifications made to the orm library was necessary to support missing features in the orm, keep it updated with the latest cassandra releases and to make it compatible with the advanced requirements of this module. |
@@ -109,3 +109,3 @@ # Usage Tutorial | ||
var UserModel = models.loadSchema('Person', { | ||
models.loadSchema('Person', { | ||
fields:{ | ||
@@ -117,3 +117,3 @@ name : "text", | ||
key:["name"] | ||
}, function(err){ | ||
}, function(err, UserModel){ | ||
//the table in cassandra is now created | ||
@@ -150,6 +150,13 @@ //the models.instance.Person or UserModel can now be used to do operations | ||
var john = new models.instance.Person({name: "John", surname: "Doe", age: 32}); | ||
var john = new models.instance.Person({ | ||
name: "John", | ||
surname: "Doe", | ||
age: 32 | ||
}); | ||
john.save(function(err){ | ||
if(err) console.log(err); | ||
else console.log('Yuppiie!'); | ||
if(err) { | ||
console.log(err); | ||
return; | ||
} | ||
console.log('Yuppiie!'); | ||
}); | ||
@@ -164,4 +171,6 @@ | ||
models.instance.Person.findOne({name: 'John'}, function(err, john){ | ||
if(err) throw err; | ||
if(err) { | ||
console.log(err); | ||
return; | ||
} | ||
//Note that returned variable john here is an instance of your model, | ||
@@ -173,1 +182,38 @@ //so you can also do john.delete(), john.save() type operations on the instance. | ||
``` | ||
## Built-in Promise Support | ||
Express-cassandra has built-in promise support powered by [bluebird](http://bluebirdjs.com/). All the orm functions has an `Async` suffixed pair function that can be used for promise based async operations instead of using callback. For example, if you want to use promises in the above two insert and find operations, you could do the following: | ||
Insert data using promise (note the Async suffix in function name): | ||
```js | ||
var john = new models.instance.Person({ | ||
name: "John", | ||
surname: "Doe", | ||
age: 32 | ||
}); | ||
john.saveAsync() | ||
.then(function() { | ||
console.log('Yuppiie!'); | ||
}) | ||
.catch(function(err) { | ||
console.log(err); | ||
}); | ||
``` | ||
Find data using promise (note the Async suffix in function name): | ||
```js | ||
models.instance.Person.findOneAsync({name: 'John'}) | ||
.then(function(john) { | ||
console.log('Found ' + john.name + ' to be ' + john.age + ' years old!'); | ||
}) | ||
.catch(function(err) { | ||
console.log(err); | ||
}); | ||
``` |
'use strict'; | ||
var Promise = require('bluebird'); | ||
var fs = require('fs'); | ||
var util = require('util'); | ||
var async = require('async'); | ||
var cql = require('dse-driver'); | ||
var _ = require('lodash'); | ||
var ORM = require('./orm/apollo'); | ||
var cql = Promise.promisifyAll(require('dse-driver')); | ||
var ORM = Promise.promisifyAll(require('./orm/apollo')); | ||
var debug = require('debug')('express-cassandra'); | ||
@@ -15,2 +18,3 @@ | ||
self.orm = new ORM(options.clientOptions, options.ormOptions); | ||
self = Promise.promisifyAll(self); | ||
}; | ||
@@ -31,2 +35,3 @@ | ||
self.orm = new ORM(options.clientOptions, options.ormOptions); | ||
self = Promise.promisifyAll(self); | ||
self.orm.connect(function (err) { | ||
@@ -61,2 +66,3 @@ if (err) { | ||
}); | ||
self.modelInstance[modelName] = Promise.promisifyAll(self.modelInstance[modelName]); | ||
} else { | ||
@@ -83,4 +89,11 @@ callback(); | ||
var self = this; | ||
self.modelInstance[modelName] = self.orm.add_model(modelName, modelSchema, callback); | ||
return self.modelInstance[modelName]; | ||
var cb = function cb(err) { | ||
if (err) { | ||
callback(err); | ||
return; | ||
} | ||
callback(null, self.modelInstance[modelName]); | ||
}; | ||
self.modelInstance[modelName] = self.orm.add_model(modelName, modelSchema, cb); | ||
self.modelInstance[modelName] = Promise.promisifyAll(self.modelInstance[modelName]); | ||
}; | ||
@@ -179,2 +192,7 @@ | ||
} | ||
}, | ||
closeAsync: { | ||
get: function get() { | ||
return Promise.promisify(CassandraClient.orm.close); | ||
} | ||
} | ||
@@ -208,2 +226,7 @@ }); | ||
} | ||
}, | ||
closeAsync: { | ||
get: function get() { | ||
return Promise.promisify(this.orm.close); | ||
} | ||
} | ||
@@ -222,3 +245,3 @@ }); | ||
module.exports = CassandraClient; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9leHByZXNzQ2Fzc2FuZHJhLmpzIl0sIm5hbWVzIjpbImZzIiwicmVxdWlyZSIsInV0aWwiLCJhc3luYyIsImNxbCIsIl8iLCJPUk0iLCJkZWJ1ZyIsIkNhc3NhbmRyYUNsaWVudCIsImYiLCJvcHRpb25zIiwic2VsZiIsIm1vZGVsSW5zdGFuY2UiLCJvcm0iLCJjbGllbnRPcHRpb25zIiwib3JtT3B0aW9ucyIsImNyZWF0ZUNsaWVudCIsInNldERpcmVjdG9yeSIsImRpcmVjdG9yeSIsImJpbmQiLCJjYiIsImNvbm5lY3QiLCJlcnIiLCJyZWFkZGlyIiwiZXJyMSIsImxpc3QiLCJlYWNoIiwiZmlsZSIsImNhbGxiYWNrIiwiZmlsZU5hbWUiLCJmb3JtYXQiLCJ2YWxpZEZpbGVFeHRlbnNpb25zIiwiZmlsZUV4dGVuc2lvbiIsImxhc3QiLCJzcGxpdCIsInRvTG93ZXJDYXNlIiwiaW5kZXhPZiIsIm1vZGVsTmFtZSIsIl90cmFuc2xhdGVGaWxlTmFtZVRvTW9kZWxOYW1lIiwibW9kZWxTY2hlbWEiLCJhZGRfbW9kZWwiLCJlcnIyIiwiZXJyMyIsInByb3RvdHlwZSIsImxvYWRTY2hlbWEiLCJ1dWlkIiwidHlwZXMiLCJVdWlkIiwicmFuZG9tIiwidXVpZEZyb21TdHJpbmciLCJzdHIiLCJmcm9tU3RyaW5nIiwidGltZXV1aWQiLCJUaW1lVXVpZCIsIm5vdyIsInRpbWV1dWlkRnJvbURhdGUiLCJ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XG4gICAgICAgIGlmIChmaWxlTmFtZS5pbmRleE9mKCdNb2RlbCcpID09PSAtMSB8fCB2YWxpZEZpbGVFeHRlbnNpb25zLmluZGV4T2YoZmlsZUV4dGVuc2lvbikgPT09IC0xKSB7XG4gICAgICAgICAgY2FsbGJhY2soKTtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBtb2RlbE5hbWUgPSBzZWxmLl90cmFuc2xhdGVGaWxlTmFtZVRvTW9kZWxOYW1lKGZpbGUpO1xuXG4gICAgICAgIGlmIChtb2RlbE5hbWUpIHtcbiAgICAgICAgICBjb25zdCBtb2RlbFNjaGVtYSA9IHJlcXVpcmUoZmlsZU5hbWUpO1xuICAgICAgICAgIHNlbGYubW9kZWxJbnN0YW5jZVttb2RlbE5hbWVdID0gc2VsZi5vcm0uYWRkX21vZGVsKFxuICAgICAgICAgICAgbW9kZWxOYW1lLnRvTG93ZXJDYXNlKCksXG4gICAgICAgICAgICBtb2RlbFNjaGVtYSxcbiAgICAgICAgICAgIChlcnIyKSA9PiB7XG4gICAgICAgICAgICAgIGlmIChlcnIyKSBjYWxsYmFjayhlcnIyKTtcbiAgICAgICAgICAgICAgZWxzZSBjYWxsYmFjaygpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgY2FsbGJhY2soKTtcbiAgICAgICAgfVxuICAgICAgfSwgKGVycjMpID0+IHtcbiAgICAgICAgaWYgKGVycjMgJiYgY2IpIHtcbiAgICAgICAgICBjYihlcnIzKTtcbiAgICAgICAgfSBlbHNlIGlmIChjYikge1xuICAgICAgICAgIGNiKCk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH0pO1xuICB9KTtcbn07XG5cbkNhc3NhbmRyYUNsaWVudC5wcm90b3R5cGUuY29ubmVjdCA9IGZ1bmN0aW9uIGYoY2FsbGJhY2spIHtcbiAgY29uc3Qgc2VsZiA9IHRoaXM7X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pZW50LnByb3RvdHlwZS50aW1ldXVpZCA9IENhc3NhbmRyYUNsaWVudC50aW1ldXVpZDtcbkNhc3NhbmRyYUNsaWVudC5wcm90b3R5cGUudGltZXV1aWRGcm9tRGF0ZSA9IENhc3NhbmRyYUNsaWVudC50aW1ldXVpZEZyb21EYXRlO1xuQ2Fzc2FuZHJhQ2xpZW50LnByb3RvdHlwZS50aW1ldXVpZEZyb21TdHJpbmcgPSBDYXNzYW5kcmFDbGllbnQudGltZXV1aWRGcm9tU3RyaW5nO1xuQ2Fzc2FuZHJhQ2xpZW50LnByb3RvdHlwZS5tYXhUaW1ldXVpZCA9IENhc3NhbmRyYUNsaWVudC5tYXhUaW1ldXVpZDtcbkNhc3NhbmRyYUNsaWVudC5wcm90b3R5cGUubWluVGltZXV1aWQgPSBDYXNzYW5kcmFDbGllbnQubWluVGltZXV1aWQ7XG5cbkNhc3NhbmRyYUNsaWVudC5wcm90b3R5cGUuX3RyYW5zbGF0ZUZpbGVOYW1lVG9Nb2RlbE5hbWUgPSBDYXNzYW5kcmFDbGllbnQuX3RyYW5zbGF0ZUZpbGVOYW1lVG9Nb2RlbE5hbWU7XG5cbm1vZHVsZS5leHBvcnRzID0gUHJvbWlzZS5wcm9taXNpZnlBbGwoQ2Fzc2FuZHJhQ2xpZW50KTtcbiJdfQ== |
{ | ||
"name": "express-cassandra", | ||
"version": "1.5.0", | ||
"version": "1.6.0", | ||
"dependencies": { | ||
"async": "^1.0.0", | ||
"bluebird": "^3.4.6", | ||
"chai": "^3.5.0", | ||
@@ -7,0 +8,0 @@ "check-types": "^1.4.0", |
@@ -21,3 +21,4 @@ [![Build Status](https://travis-ci.org/masumsoft/express-cassandra.svg)](https://travis-ci.org/masumsoft/express-cassandra) | ||
* support for before and after hook functions for save/update/delete | ||
* builtin experimental support for automatic migrations | ||
* built-in experimental support for automatic migrations | ||
* built-in promise support with Async suffixed functions | ||
@@ -24,0 +25,0 @@ This module uses datastax [dse-driver](https://github.com/datastax/nodejs-driver-dse) which is based on the official [cassandra-driver](https://github.com/datastax/nodejs-driver) for node. The dse driver is used so that both apache-cassandra and datastax enterprise users can use this module. Some of the base orm features are wrapper over a highly modified version of [apollo-cassandra](https://github.com/3logic/apollo-cassandra) module. The modifications made to the orm library was necessary to support missing features in the orm, keep it updated with the latest cassandra releases and to make it compatible with the advanced requirements of this module. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
553871
3081
41
10
+ Addedbluebird@^3.4.6
+ Addedbluebird@3.7.2(transitive)