cloudhead/cradle — Issue #129: Multiple keys problem
Author: debone
Created: 2011-12-26 12:01:42+00:00
State: open

I've been trying to use multiple keys in Cradle.
I use this query with an HTTP request and it brings me the results I expected:

gps_map/_design/carros/_view/teste?startkey=[353451044222222]&endkey=[353451044222222,{}]&limit=50

I tried to reach the same results with Cradle:

var car = 353451044222222;
db.view('carros/teste',{limit:50,startkey:[car],endkey:[car,{}]},function(err,res)

or

var car = 353451044222222,
start = [],
end = [car,{}];
start[0] = car;
db.view('carros/teste',{startkey:start,endkey:end,limit:50},function(err,res)

Some guys on Nodejs mailing list told me that this code should work, but It doesn't.