Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

De-synchronization fails #109

Open
darrudi opened this issue Sep 7, 2014 · 0 comments
Open

De-synchronization fails #109

darrudi opened this issue Sep 7, 2014 · 0 comments

Comments

@darrudi
Copy link

darrudi commented Sep 7, 2014

Hi there,
I tried to make a de-synchronized version of execute but to no avail.
I checked out several popular node.js libraries including:

  • node-sync
  • deasync
  • and finally sync
    All of them throw the following exception:
[TypeError: Object #<Object> has no method '_getAConnection']

Reproducing the error:

var Sync = require('sync');
var cql = require('node-cassandra-cql');

var client = new cql.Client({hosts: ['cassandra1.nikoo.ir', 'cassandra2.nikoo.ir'], keyspace: 'nikoomail'});

// Run in a fiber
Sync(function(){

    var result = undefined;

    try {
        result = client.execute.sync(null, 'SELECT * FROM nikoomail.user where username=?', ['darrudi@nikoo.ir']);
    }
    catch (e) {

        console.error('CQL query execution failed!');
        console.log(e);
        process.exit(-1);
    }

    console.log(result);
})

Thanks,
Ehsan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant