Hello! I want to do something simple. I have a collection of chat messages and I want to return them in groups of 100. I want to be able to get the next 100 messages after a message with a given _id.
One way to do this would be to query for that particular record, get the timestamp, then query for the next 100 records with an earlier timestamp. Or the client itself could just send the timestamp of the relevant message directly to the server, so only one query would need to be made.
However, I am wonder if it is possible to do what I am trying to do in a single query, given the _id of the relevant message?