Problem with cursors
smashercosmo opened this issue · 2 comments
smashercosmo commented
There is a possibility, that I'm doing something wrong, but this example from the docs doesn't work
User.map(r.row("id")).execute().then(function(cursor) {
cursor.each(function(err, userId) {
console.log(userId);
}
})
I'm getting an error
Unhandled rejection TypeError: cursor.each is not a function
rethinkdb 2.3.4
thinky 2.3.7
neumino commented
I think you need cursor: true
here.
User.map(r.row("id")).execute({cursor; true}).then(...)
smashercosmo commented
Thx) Worth adding to docs)