react-native-firebase icon indicating copy to clipboard operation
react-native-firebase copied to clipboard

Add support for the new 'multi-database' firebase feature

Open Salakar opened this issue 9 years ago • 4 comments

We've been tracking this for a while, this issue is purely for 'todo' purposes.

Reference: http://firebase.googleblog.com/2017/11/easier-scaling-with-multi-database.html

Web SDK: https://firebase.google.com/docs/reference/js/firebase.database

firebase.database() can be called with no arguments to access the default app's 
Database service or as firebase.database(app) or firebase.database(URL) to access
the Database service associated with a specific app or database URL.
firebase.database(url);

Android SDK: https://firebase.google.com/docs/reference/android/com/google/firebase/database/FirebaseDatabase.html#getInstance(java.lang.String)

public static FirebaseDatabase getInstance (String url)
// Gets a FirebaseDatabase instance for the specified URL.
// ..
FirebaseDatabase.getInstance(url);

iOS SDK: https://firebase.google.com/docs/reference/ios/firebasedatabase/api/reference/Classes/FIRDatabase#databasewithurl

+ (nonnull FIRDatabase *)databaseWithURL:(nonnull NSString *)url;
// ...
[FIRDatabase databaseWithURL:url]

Salakar avatar Nov 21 '17 08:11 Salakar

@chenjh1992 : ^ You can possibly sync with @Salakar and implement something that can be merged upstream.

akshetpandey avatar Nov 21 '17 08:11 akshetpandey

@akshetpandey @Chenjh1992 - contributions welcome 👍

Salakar avatar Nov 21 '17 08:11 Salakar

@Salakar The implementation is: passing a dbURL associated with appName so it can support multiple apps or multiple shard databases. Will create the PR later.

Chenjh1992 avatar Nov 26 '17 23:11 Chenjh1992

See PR #649

Salakar avatar Dec 03 '17 14:12 Salakar