index.js
function _attachExecMethod(qb) {
  /**
   * Create the exec function for a pass through to the datastax driver.
   *
   * @param `{Object} options` optional argument passed to datastax driver upon query execution
   * @param `{Function} cb` => function(err, result) {}
   * @returns {Client|exports|module.exports}
   */
  qb.exec = function (options, cb) {

    var _options = typeof options !== "undefined" && _.isFunction(options) ? {} : options
      , _cb;

    if (!_.has(_options, "prepare")) {
      _options.prepare = qb._execPrepare;
    }

    if (_.isFunction(options)) {
      _cb = options;
    }
    else if (_.isFunction(cb)) {
      _cb = cb;
    }
    else {
      _cb = _.noop;
    }

    if (cassandra !== null && cassandra.connected) {
      var cql = qb.cql();
      cassandra.execute(cql, qb.bindings(), _options, _cb);
    }
    else {
      _cb(new Error("Cassandra client is not initialized."));
    }

    // maintain chain
    return qb;
  };
}
function _attachExecMethod(qb) {
  /**
   * Create the exec function for a pass through to the datastax driver.
   *
   * @param `{Object} options` optional argument passed to datastax driver upon query execution
   * @param `{Function} cb` => function(err, result) {}
   * @returns {Client|exports|module.exports}
   */
  qb.exec = function (options, cb) {

    var _options = typeof options !== "undefined" && _.isFunction(options) ? {} : options
      , _cb;

    if (!_.has(_options, "prepare")) {
      _options.prepare = qb._execPrepare;
    }

    if (_.isFunction(options)) {
      _cb = options;
    }
    else if (_.isFunction(cb)) {
      _cb = cb;
    }
    else {
      _cb = _.noop;
    }

    if (cassandra !== null && cassandra.connected) {
      var cql = qb.cql();
      cassandra.execute(cql, qb.bindings(), _options, _cb);
    }
    else {
      _cb(new Error("Cassandra client is not initialized."));
    }

    // maintain chain
    return qb;
  };
}
function _attachExecMethod ( qb ) { /**
   * Create the exec function for a pass through to the datastax driver.
   *
   * @param `{Object} options` optional argument passed to datastax driver upon query execution
   * @param `{Function} cb` => function(err, result) {}
   * @returns {Client|exports|module.exports}
   */ qb . exec = function ( options , cb ) { var _options = typeof options !== "undefined" && _ . isFunction ( options ) ? { } : options , _cb ; if ( ! _ . has ( _options , "prepare" ) ) { _options . prepare = qb . _execPrepare ; } if ( _ . isFunction ( options ) ) { _cb = options ; } else if ( _ . isFunction ( cb ) ) { _cb = cb ; } else { _cb = _ . noop ; } if ( cassandra !== null && cassandra . connected ) { var cql = qb . cql ( ) ; cassandra . execute ( cql , qb . bindings ( ) , _options , _cb ) ; } else { _cb ( new Error ( "Cassandra client is not initialized." ) ) ; } // maintain chain return qb ; } ; }
hooks the 'exec' cassandra client method to our query builder object
@param qb
@private
hooks the exec cassandra client method to our query builder object