Description
The query panel currently only allows queries against the (default) database instance. When working with multiple Firestore database instances (e.g., staging, production, etc.), there's no way to switch the target database within the query panel or via code.
Current Behavior
- The
db object in the query panel is pre-initialized with the (default) database instance
- Attempting to modify
db._databaseId or db._settings.databaseId has no effect on actual queries
- Queries always return data from the
(default) database regardless of property modifications
Expected Behavior
Would like one or more of the following options:
- A dropdown/selector in the query panel UI to choose the target database instance
- Ability to programmatically change the database instance within query code
- Support for creating new Firestore client instances targeting different databases
Steps to Reproduce
- Connect to a Firebase project with multiple database instances (e.g.,
(default) and staging)
- Open the query panel
- Run a query like:
async function run() {
const query = await db.collection("bookings").limit(50).get();
return query;
}