EddyVerbruggen / nativescript-plugin-firebase

:fire: NativeScript plugin for Firebase
https://firebase.google.com
MIT License
1.01k stars 444 forks source link

Connect to multiple database instances #663

Open kilka opened 6 years ago

kilka commented 6 years ago

Is there support for connecting to multiple databases? I tried looking through the documentation and wasn't able to find anything.

https://firebase.google.com/docs/database/usage/sharding

EddyVerbruggen commented 6 years ago

I have never played with that. If there's any additional work to be done in native code then I'm sure it won't work.

BryanYomar04 commented 6 years ago

Hi, In case I wanted to have two databases and use one of them at a time, it should work right? I am changing the DB URL in the code, but it doesn't recognize it is a different db.

EddyVerbruggen commented 6 years ago

Isn’t that also tied to the config file you downloaded to app_resources?

BryanYomar04 commented 6 years ago

In Android's JSON, it isn't tied. In the iOS side, it includes the link, but even when I changed it the app doesn't recognize the change. What could I do to use the other DB?

BoHuCB commented 4 years ago

I am in a slightly different situation. From the document https://firebase.google.com/docs/projects/multiprojects, it is possible to initialize multiple firebase references by configuration as projectId, appId, apiKey and databaseURL, so that different realtime databases from different firebase app could be accessible.I am also in a situation where I need to access the realtime database from another firebase application for data. I am wondering if this is possible with nativescript plugin firebase?

manojdcoder commented 4 years ago

The current version of the plugin do not support multiple connections, but it's possible with significant efforts, may require native code changes.