One more question on this topic. That onEndOfSnapshot function gets called when the main table's snapshot is finished, which is when all rows have been added to the table. But at that point, the rows are mostly empty.

As I understand it, each row gets its own subscription, and its own snapshot. So after onEndOfSnapshot is called, you'll get an update for each row, with a CHANGE command, and itemUpdate.isSnapshot set to true.

What's the best way to detect when all of those snapshots have been received? I'd like to know when the table is fully populated with data, not just when it has the names of all the row items. I can think of two ways:

1) Look for the first update where isSnapshot is false. This seems to only happen after all of the rows' snapshots have been received, but I'm not sure whether that's guaranteed to be the case. Also, this means you have to wait for the first non-snapshot update before you can know that the snapshot is done.

2) Count the number of rows that were ADDed, and wait until you get an UPDATE with isSnapshot=true for each one. This seems more reliable, although it involves more work on the client side.

Or is there a way to listen for the onEndOfSnapshot for each individual row's table?

Thanks,
Jacob