Complete the code to start the query after the last document.
query = collectionRef.orderBy('timestamp').[1](lastDoc)
The startAfter method tells Firestore to begin the query after the specified document, enabling cursor-based pagination.
Complete the code to end the query before the first document.
query = collectionRef.orderBy('timestamp').[1](firstDoc)
The endBefore method tells Firestore to end the query before the specified document, useful for backward pagination.
Fix the error in the code to correctly paginate starting after a document.
query = collectionRef.orderBy('timestamp').[1](lastDoc)
The startAfter method requires the full document snapshot or field values, not just the document ID.
Passing lastDoc.id is incorrect; you should pass lastDoc itself.
Fill both blanks to paginate between two cursors correctly.
query = collectionRef.orderBy('timestamp').[1](startDoc).[2](endDoc)
Use startAfter to begin after the start cursor and endBefore to end before the end cursor for precise pagination.
Fill all three blanks to create a paginated query with limit and cursors.
query = collectionRef.orderBy('timestamp').[1](cursorDoc).limit([2]).[3]()
This code starts after the cursor document, limits results to 10, and fetches the documents with get().