index.js
function(command, callback) {
    var self = this;
    return new Promise(function(resolve, reject) {
        var prCB = function(err, data) {
          if (err) {
            log.error(err.message);
            log.debug(command);
          }
          return (err ? reject('err') : resolve(data));
        };
        self.connection.execute(command, function(err, result) {
          prCB(err, result)
        });
    });
  }
function(command, callback) {
    var self = this;
    return new Promise(function(resolve, reject) {
        var prCB = function(err, data) {
          if (err) {
            log.error(err.message);
            log.debug(command);
          }
          return (err ? reject('err') : resolve(data));
        };
        self.connection.execute(command, function(err, result) {
          prCB(err, result)
        });
    });
  }
function ( command , callback ) { var self = this ; return new Promise ( function ( resolve , reject ) { var prCB = function ( err , data ) { if ( err ) { log . error ( err . message ) ; log . debug ( command ) ; } return ( err ? reject ( 'err' ) : resolve ( data ) ) ; } ; self . connection . execute ( command , function ( err , result ) { prCB ( err , result ) } ) ; } ) ; }
Function to execute the CQL statement through cassandra-driver execute method.

@param string command - A Cassandra query to run.
@param Object callback
Function to execute the CQL statement through cassandra - driver execute method .