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

result2 in callback function? #99

Open
dest31337 opened this issue Jul 17, 2014 · 2 comments
Open

result2 in callback function? #99

dest31337 opened this issue Jul 17, 2014 · 2 comments

Comments

@dest31337
Copy link

Trying to use node-cassandra-cql in async flow control methods which add for next function argument "callback" (and hides first argument "error"):
async.waterfall([
function(callback) {
client.executeAsPrepared(select,
[param],
callback
);
},
function(result, callback) {
...
}], ...);
I got error because in Client.prototype._executeOnConnection callback called with 2 result args:
callback(err, result1, result2);
Why? Refer to documentation:
"Callback should take two arguments err and result."

@sarus
Copy link

sarus commented Jul 18, 2014

Didn't look into this too much but could this be similar to issue #85?

Perhaps result2 is actually the retryCount like in the execute function. The execute function also returns 3 parameters even though the documentation only states that it returns err and result.

@dest31337
Copy link
Author

It's undefined. I can't find any use of result2 in code.

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

2 participants