Permalink
Browse files

Fix query last row check

  • Loading branch information...
1 parent 76c4180 commit 0dca68232888a1830376bb716de2af3f9777c039 @alexwhitman alexwhitman committed Jul 16, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 query.cc
View
2 query.cc
@@ -756,7 +756,7 @@ int node_db::Query::eioExecuteFinished(eio_req* eioRequest) {
eachArgv[0] = row;
eachArgv[1] = v8::Number::New(index);
- eachArgv[2] = v8::Local<v8::Value>::New(iterator == end ? v8::True() : v8::False());
+ eachArgv[2] = v8::Local<v8::Value>::New((index == request->rows->size() - 1) ? v8::True() : v8::False());
request->query->Emit(syEach, 3, eachArgv);

0 comments on commit 0dca682

Please sign in to comment.