i'm attempting use rest api query firebase (just using curl now).
i've attempted query using orderbychild returns results, not appear sorting.
curl -k 'https://shining-fire-6711.firebaseio.com/todos.json?orderbychild="name"' i have tried use orderbychild in conjunction equalto clause, returns error orderby must defined when other query parameters defined
curl -k 'https://shining-fire-6711.firebaseio.com/todos.json?orderbychild="name"&equalto="c"'
according firebase document:
indexes not required development unless using rest api. realtime client libraries can execute ad-hoc queries without specifying indexes. performance degrade data query grows, important add indexes before launch app if anticipate querying large set of data.
this document hiding somewhere deep spent me hours until find that.
in addition execute example (which obtained another firebase document). tried running following code on console
curl 'https://dinosaur-facts.firebaseio.com/dinosaurs.json?orderby="height"&print=pretty'
it returns data. here part of returned value
{ "linhenykus" : { "appeared" : -85000000, "height" : 0.6, "length" : 1, "order" : "theropoda", "vanished" : -75000000, "weight" : 3 } } it shows don't need use parameter orderbychild, using orderby trick.
Comments
Post a Comment