How to query a collection and return a random document? #180
-
I found this answer: https://stackoverflow.com/questions/46798981/firestore-how-to-get-random-documents-in-a-collection Also, when I query and print the result, all I get is this: [{readTime:2021-04-18T17:23:18.498566Z}] |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@InfiniteNex Sorry it took so long to get back to you. In terms of selecting a random document in a collection, I would need to look into that. You are honestly the first person that has asked the question. In regards to printing the document, take a look at this part of the wiki: https://github.com/GodotNuts/GodotFirebase/wiki/Firestore#get-a-document You can also look at this test code I have when we test a new version of the plugin
~ Chuck |
Beta Was this translation helpful? Give feedback.
@InfiniteNex Sorry it took so long to get back to you.
In terms of selecting a random document in a collection, I would need to look into that. You are honestly the first person that has asked the question.
In regards to printing the document, take a look at this part of the wiki: https://github.com/GodotNuts/GodotFirebase/wiki/Firestore#get-a-document
You can also look at this test code I have when we test a new version of the plugin