Realtime Database

Since v2.3.0

Browse, Live and Queries

Fuego shows a Realtime Database node as a tree, columns, a table or raw JSON, and reads its children one page of keys at a time so it downloads little until you ask for more. Follow changes live, search keys, filter and query children without code, compare nodes, decode push IDs, and generate SDK snippets.

The Realtime Database page

Choose a database from a project’s Realtime Database entry in the sidebar. Each tab of the page shows one node of one database:

  • The breadcrumb above the data is the node’s path: click a part of it to go up, or Type a path to go anywhere. Its first part, Databases, lists all the databases of the project.
  • Open database, at the top right, opens a database in a new tab.
  • The sidebar lists the keys of the tab’s database, page by page and never their values: a click opens a key in the tab, a middle click in a new tab. It always reads as Admin; when the tab reads as a user, it says Keys as Admin.
  • Every read of a tab is made as the identity its badge shows, As: Admin unless you choose a user or As: Unauthenticated (Security rules and Read as a user).

Browsing works on every plan, Free included. The paid plans (Individual, Team and the Lifetime Deal) add Live updates, advanced queries and editing (Edit data). An emulator project needs a paid plan, even to browse.

Four views

Choose how the children of the tab’s node are shown with the buttons above the data, or in the View menu. A new tab opens in the view you chose last.

  • Tree, the view Fuego starts with: expand a node to read it.
  • Panel: columns side by side, one level per column, from the tab’s node down to the key you select.
  • Table: one row per child (see The table). On a page of keys alone it offers Load in key order first.
  • Raw JSON: the node’s JSON in a read-only editor, as the database sent it, with Copy JSON. A node Fuego has not read yet loads only when you click Load the JSON, after Fuego says how much it may download (up to 10 MB).

Double-click a node, or press Enter, to open it in the tab. A middle click, or ⌘ Enter (Ctrl Enter), opens it in a new tab. Space, or a click on a key or on a value, shows its details. In the panel view a click on a key with children opens its column, a click on a value shows its details, and the pencil on a row shows the details of any node.

The table

The table has a Key column, one column per key of the children (the first 50 Fuego finds) and a Value column for children that are not objects. A click on a header, or Sort ascending (loaded rows) and Sort descending (loaded rows) in its menu, sorts the rows already loaded, with no new request.

Right-click a header for its menu:

  • Sum and Average of the numbers in the column, calculated on the rows already loaded.
  • Hide column, Move left, Move right, Copy column name and Show all columns. Fuego remembers the widths, the order and the hidden columns on this computer.
  • Query by this child… opens the query panel ordered by that column.

On a paid plan, a pencil in a cell edits that single value in place: Edit data.

How Fuego reads the children

Firebase bills every byte the database sends, so Fuego reads as little as it can:

  • It lists a node’s children one page of keys at a time, without their values. When the whole node fits in one page and weighs 1 MB or less, it reads it whole, values included.
  • Otherwise the keys come sorted as text (10 before 9), without their values. Expanding a key reads that node only.
  • A node over 1 MB shows its keys only until you click Load values (up to 10 MB).
  • View ▸ Load in key order, or Open in key order in a node’s menu, sorts integer keys as numbers and downloads the values of every page. Back to key-text order returns.

The status bar at the bottom pages through the children (Keys per page: 25, 50, 100 by default, 250, 500 or 1000). Inside the tree and the panel, an expanded node grows one page at a time up to 500 rows; past that, Open here opens it in the tab. At its right end, the status bar shows what the tab downloaded, such as “1.2 MB read in this tab”.

Count children

Count in the status bar, or Count children in a node’s menu, counts a node’s children by reading their keys only, never their values. It shows its progress with Cancel; a count that stops early offers Count all, up to 1,000,000 keys.

View switches

The View menu also holds these switches:

  • Anonymize values masks the values of the tab while keys stay readable. Everything you open from the tab keeps the setting. See Anonymization.
  • Keys only makes the tab list keys without their values, in expanded nodes too, until you turn it off.
  • Show priorities shows each node’s priority in every tab, read-only.

Details of a node

Space, a click on a value or on a key of the tree, the pencil on a row of the panel view, or Details (Edit… when writable) in a node’s menu opens the details panel on the right: the node’s path, type, number of children, size, the time a push ID key was created and its value, plus its priority while Show priorities is on. For a large node Fuego reads the keys only until you click Load the value (up to 10 MB).

JSON schema

The details panel’s JSON schema menu describes what a node should hold:

  • View or edit… opens the schema of the node (applied to This node or Each child, for one key or any key at each level).
  • Generate from this node… builds a schema from the node’s types without copying any value.
  • Validate with the JSON schema highlights mismatches while you edit, and never stops a save.

The node menu

Right-click a node in the tree, the panel or the table, or a part of the breadcrumb, for its menu (the Data menu offers the same for the tab’s own node):

  • Open here, Open in a new tab and Open in window (Windows and links).
  • Open in quick view: the node’s details in a small window (Quick View). A window and a quick view always read as Admin.
  • Add bookmark and Remove bookmark (Bookmarks).
  • Preview the children: the first 20 children in key order, with their values, in a small table.
  • Compare: Select for comparison on one node, then Compare with {node} on another to compare two nodes side by side, even across databases, projects or an emulator.
  • Copy: Key, Path, Value, Fuego link, Firebase console URL, REST URL and Generate code….
  • Count children, Open in key order, and Decode the push ID on a push ID key.

Preview of the rows

In the tree, a collapsed object shows a one-line preview of its value, chosen with the Preview of the rows button of the Value header: Automatic, Fields, Template (such as {a/b}) or None, applied to This node or Every node like it.

Select rows

In the tree and the table, each row of the tab’s node has a checkbox, and the header checkbox selects the page. In the table, Shift-click selects a range, and dragging a rectangle from below the rows selects the rows it crosses. The selection menu (Selected: {count}) copies their keys, paths or values, compares two rows, or exports, copies, moves, updates or deletes the selection.

Push IDs

Tools ▸ Generate a push ID (and the command palette) copies a new push ID. Tools ▸ Decode a push ID… reads the creation timestamp from a push ID, or from a path or URL that ends with one. In the tree, a push ID key shows a clock icon with its creation date on hover.

Generate code

Tools ▸ Generate code…, or Copy ▸ Generate code… in a node’s menu, writes the code that reads the node and its query in Web, Node.js, Python, Go, Java or REST (curl), Once or Listen for changes, without embedding any credentials or tokens.

Live updates

With a paid plan, Live keeps the views you have open up to date: each change in the database appears as it happens, with no reload, reading as the tab’s identity. On the Free plan a view is read once, and the Live button shows a crown.

Turn Live on or off for one tab with the Live button at the right end of the toolbar (just before reload), View ▸ Live, or the command palette.

Live on by default

In Settings ▸ General, panel Realtime Database, the Live on by default switch decides whether new tabs start with Live on. A tab whose Live button you clicked keeps that choice. The first time you open a database on a paid plan, a notice lets you keep the default (Got it) or Turn off Live by default.

What the Live button shows

The buttonWhat it meansA click
Green dotFollowing changes as they happen, with what Live downloadedTurns Live off
Pulsing green dotConnecting or reconnectingTurns Live off
PausedPaused (When Live pauses)Resumes it now
Empty circleLive is off for this tabTurns Live on
Crossed-out circleLive cannot follow this view (What Live can follow)Opens options when available
Grey dotStopped (When Live stops)Starts it again
Red dotStopped on an error or lost connectionTries again
CrownNot included in the Free planShows the plans

What Live can follow

Live follows a node under 1 MB, or a list with a limit. When a node has more children than one page, exceeds 1 MB, runs a key search or uses Keys only, the button shows a crossed-out circle. For a large node or a node with many children, clicking the button offers Use key order or Add a limit….

When Live pauses

Live pauses and shows Paused on its button:

  • In a hidden window, about a minute after the window is minimised or hidden, and resumes when the window shows again.
  • In background tabs: only the tab on screen is followed; the others start again when you switch to them.
  • When too many views are live: Fuego follows at most 5 views per database and 10 in all across every window (dashboard widgets with Live included). Starting one more pauses the least recently viewed stream.

When Live stops

A stopped view keeps the values it had (with the timestamp they date from and Read them again) and waits for a click to start again:

  • After 15 minutes without activity (clicks, key presses, scrolling or switching tabs/windows).
  • When the connection keeps dropping (Fuego reconnects by itself after a brief drop or after your computer wakes up).
  • When stopped by the app (a window reload, opening developer tools or restoring a backup) or on an error (such as security rules refusing the read).

What Live downloads

What Live downloads counts toward your Firebase bill. A view is downloaded once when Live starts, then each change as it happens, and downloaded again whenever the view restarts after a pause, a stop, a tab switch or a reconnection.

The status bar at the bottom of each tab shows an estimate of what the tab downloaded (Firebase also bills protocol overhead), and its tooltip shows what Live downloaded in the tab and what Fuego downloaded (↓) and sent (↑) for the database in this session. To download less, turn Live off where you do not need it, use View ▸ Keys only or Count children, stay in key-text order, and only load Raw JSON when needed.

Search keys or filter

Click Search keys or filter… at the top of the tab, or press ⌘ ⇧ F (Ctrl ⇧ F on Windows and Linux). A tab uses one mode at a time:

  • Search by key (Key starts with…): lists the children whose key starts with the text you type. Values are never searched, as that would download them.
  • Filter the children: choose Order by (Key, Value, Priority or Child path such as address/city), then Equal to or Show the first (the simple queries available on every plan).

Global search (Search Realtime Database in its options) also finds databases by name, root keys starting with what you type (up to 20 per database) and keys already loaded in the window, without searching values.

Queries and saved queries

The query panel

Open the query panel from More query options in the search box, from a row’s right-click Query submenu, from a table column’s Query by this child…, from the command palette (Open the query panel) or from an AI assistant query card.

The panel edits the query as a Form or as JSON (with schema suggestions as you type), and offers Run the query, Clear the query, Save, Generate code… and Share as file….

The parts of a query

Choose an Order by first (Key, Value, Priority, or Child path), then combine:

  • Equal to: only the children whose order value equals this one (cannot be combined with a start or an end).
  • Start: Start at (inclusive) or Start after (exclusive).
  • End: End at (inclusive) or End before (exclusive).
  • Then by key: optional secondary key bound for a start or an end (except in key order).
  • Limit: the First or the Last children, from 1 to 10,000 (defaults to 100).

Placeholders

Write a placeholder such as {{country}} in Equal to, Start or End, and the panel lists it under Placeholder values. Placeholders are saved with the query; their values are requested in the panel before the query runs and are not saved.

Free and paid plans

Ordering, Equal to, First limits, the key search, paging, and saving or sharing queries work on every plan.

Start at, Start after, End at, End before and Last limits are part of the paid plans (in the query panel, in exports and on the command line). On the Free plan they carry a crown; opening a saved query or file that uses them shows which part requires a paid plan and lets you remove it to run the query.

Saved queries

Click Save in the query panel (or Saved queries ▸ Save the current query… in the search box menu) to save a query with a Name (up to 100 characters) and an optional Favorite star. Find your saved queries in the search box menu, in the sidebar’s Bookmarks (Realtime Database group), in the command palette and on the Home page. Right-click a saved query in Bookmarks to Modify query or Delete the saved query.

Share a query as a file

Share as file… in the query panel (or Saved queries ▸ Share as file in the search box menu) writes the query—with its project, database, node and placeholders—to a .fuego file (requires Fuego 2.3.0 or later to open: see Workspaces, dashboards, files and sync).

When a query needs an index

When the Realtime Database refuses a query because its rules lack an .indexOn rule, the tab shows This query needs an index with the rule to add:

{
  "rules": {
    "orders": {
      ".indexOn": ["createdAt"]
    }
  }
}

Click Add the index… to open the security rules with the .indexOn rule added in place (on a paid plan, check and apply it and the query runs again; on the Free plan, copy the rule), or Copy the rule / Open the rules in the console. On an emulator, applying the rules updates the running emulator only; add the index to your database.rules.json file as well.