-
lets say i create a live data proxy on a collection of collections, /groups/group_memebers. When i proxy the path /groups, does it immediately and automatically download / cache / maintain ALL the data of groups upon creation of the proxy? Or does do it dynamically as needed, after i actually access a node for read/write? What im hoping to achieive is some level of filtering via the proxy. So an ideal behavior is that i proxy the /groups path. The data is isn't yet downloaded on .ref(). Then i filter the groups manually into an array. Then i start doing stuff with the objects in the array, and data will be downloaded/cached as i access each node. If not, is there a way to acheive that via proxy? The concern here is that, other than downloading unnecessary data, it becomes a security issue since all data will be exposed in the localdb (or is there some encryption feature im not aware of =). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
A proxy fetches all data from the database before it can be used. It cannot dynamically fetch data upon access because that would require an asynchronous flow and would make code like |
Beta Was this translation helpful? Give feedback.
A proxy fetches all data from the database before it can be used. It cannot dynamically fetch data upon access because that would require an asynchronous flow and would make code like
var name = proxiedUser.name
impossible. If you want to dynamically load (and proxy) data based upon application logic, you might want to check out thereflect
API