Skip to content

De-synchronization fails #109

Open
Open
@darrudi

Description

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions