Closed GoogleCodeExporter closed 8 years ago
I believe in server.js, this is what was meant to be (or something similar?):
return ".fastSort(" +
oper[1].replace(/\s*,?\s*([\/\\])\s*([^,\\\/]+)/g,function(t,a,b){return (first
?
(first=false) || '': ').fastSort(') + "function($obj){return " + b + "}," + (a==
"/");}) + ")";
instead of this:
return ".fastSort(" +
oper[1].replace(/\s*,?\s*([\/\\])\s*([^,\\\/]+)/g,function(t,a,b){return (first
?
(first=false) || '': ',') + "function($obj){return " + b + "}," + (a== "/");})
+ ")";
Original comment by beau.cro...@gmail.com
on 20 Aug 2009 at 11:29
Or something along the lines of (in PersistableArray.java):
if(args.length > 2)
return Query.parseQuery((Query) id, scope, ((Function)args[0]), true,
ascending).getTarget();
else
return Query.parseQuery((Query) id, scope, ((Function)args[0]), false,
ascending).getTarget();
I tested against:
curl -g 'http://localhost:8080/test3/[/name,\extra]'
{}&&[
{"id":"3",
"name":"bar",
"extra":"1"
},
{"id":"2",
"name":"foo",
"extra":"2"
},
{"id":"1",
"name":"foo",
"extra":"1"
}
]
AND
curl -g 'http://localhost:8080/test3/[/name,/extra]'
{}&&[
{"id":"3",
"name":"bar",
"extra":"1"
},
{"id":"1",
"name":"foo",
"extra":"1"
},
{"id":"2",
"name":"foo",
"extra":"2"
}
]
This seems to work, but I don't know if this was the proper meaning.
Original comment by beau.cro...@gmail.com
on 21 Aug 2009 at 3:49
Thanks for the suggestion.
Original comment by kris...@gmail.com
on 29 Aug 2009 at 4:28
Original issue reported on code.google.com by
elf...@gmail.com
on 20 Aug 2009 at 6:16