Counting records in a table is obviously a manual effort until you guys get some of that spiffy new functionality already in the works ;)
However, I'm stuck on even using a manual run with .on('value', ...) to fetch a count:
var table = new Firebase('http://beta.firebase.com/user/tablename');
var count = 0;
table.on('child_added', function(snapshot) {
count++;
// how do I know if this is the last child? i.e. the count is complete?
});
// when is it okay to use count?
I foresee the same issues with any sort of pagination and I feel like I'm being a bit blockheaded about this. What am I missing?
Is this fundamentally the wrong pattern for, say, getting the number of messages a user has in his/her queue?