A group of serialized documents and queries, suitable for
longterm storage or query resumption.
If any queries are added to this bundle, all associated documents will be
loaded and stored in memory for serialization.
Usage:
from google.cloud.firestore import Client, _helpers
from google.cloud.firestore_bundle import FirestoreBundle
db = Client()
bundle = FirestoreBundle('my-bundle')
bundle.add_named_query('all-users', db.collection('users')._query())
bundle.add_named_query(
'top-ten-hamburgers',
db.collection('hamburgers').limit(limit=10),
)
serialized: str = bundle.build()
# Store somewhere like a Google Cloud Storage bucket for retrieval by
# a client SDK.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-30 UTC."],[],[]]