vuejs / vuefire

🔥 Firebase bindings for Vue.js
https://vuefire.vuejs.org
MIT License
3.84k stars 331 forks source link

`useFirestore` should allow to select a non `(default)` database #1558

Open aaaaahaaaaa opened 1 month ago

aaaaahaaaaa commented 1 month ago

What problem is this solving

As far as I can tell, there's no way to select a different Firestore database aside from the (default) one. Firestore multi database support is GA since February.

The getFirestore SDK allows to select the database based on the ID: https://firebase.google.com/docs/reference/js/firestore_.md#getfirestore_48de6cb

Proposed solution

The composable should take the Database ID as a param.

Note: the composable currently already takes a name as param, for the name of the Firebase App, which is confusing IMO.

Describe alternatives you've considered

No response

szulcus commented 1 month ago

Bump: https://firebase.google.com/docs/firestore/manage-databases

szulcus commented 2 weeks ago

@posva if you ever start working on it, I just wanted to let you know so you can add this functionality to useDatabase() as well. Thanks in advance!