Home > Blockchain >  Is it possible to store QueryCursor on Firestore?
Is it possible to store QueryCursor on Firestore?

Time:10-19

I want to know whether we can store query cursors on Firestore or not. If so then how can we retrieve it back as a DocumentSnapshot?

CodePudding user response:

I haven't heard of any QueryCursor class so far, but in Firestore you can only store supported data types.

Edit:

But when I do so, I get errors in deserializing the object.

That's normal behavior since that type of object is not supported. So it cannot be deserialized.

And for where to start at I want to store the last document snapshot on the Firestore database and retrieve it later for paginating.

Most likely you should consider storing that data in a data structure called SharedPreferences and use it any time you need it. This persists application restarts.

  • Related