Skip to content

Feature Request: Allow dynamic database instance selection in query panel (currently locked to default) #4

@shaictal

Description

@shaictal

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:

  1. A dropdown/selector in the query panel UI to choose the target database instance
  2. Ability to programmatically change the database instance within query code
  3. Support for creating new Firestore client instances targeting different databases

Steps to Reproduce

  1. Connect to a Firebase project with multiple database instances (e.g., (default) and staging)
  2. Open the query panel
  3. Run a query like:
    async function run() {
      const query = await db.collection("bookings").limit(50).get();
      return query;
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions