0.0.2 • Published 9 years ago

cassandra-prom v0.0.2

Weekly downloads
19
License
ISC
Repository
github
Last release
9 years ago

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']);
})();