Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
213 views
in Technique[技术] by (71.8m points)

javascript - Temporarily store array of data in Firestore

This question is in regards to a discussion that went on here.

I have a collection of urls in an array that I need to parse through using a Firebase Cloud Function. Instead of iterating through the URL's on the client (I could potentially have hundreds of items in this array) and making individual requests to the function, I'd rather store the entire array in Firestore, pass the ID of the collection to the function, grab the array on the server, iterate through it and perform some operations, and then either save it back to Firestore with a new ID and respond back to the client with that ID so it can consume/destroy, or just respond with an newly mutated array (not sure which one I'd like to use yet).

There doesn't seem to be a "preferred" way to store arrays with Firebase since it's generally considered evil, however, what if I don't plan to keep the data around for very long?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...