cassandra-prom
Promisify the Cassandra driver
Example:
npm i cassandra-prom cassandra-driver bluebird
'use strict';
const Promise = require('bluebird');
const options = {
"contactPoints": ["localhost"],
"keyspace": "test"
}
const Client = require('cassandra-prom')(require('cassandra-driver').Client);
const client = new Client(options);
Promise.coroutine(function *() {
const query = 'SELECT email, last_name FROM user_profiles WHERE key=?';
yield client.execute(query, ['123']);
})();