Published OnAugust 7, 2025August 7, 2025

Moving from Legacy Data Browser to DQL Editor

We’ve upgraded the Ditto Portal with a powerful new DQL Editor—if you’re still using the old Data Browser, it’s time to switch and unlock full create, read, update, and delete capabilities right from your browser.

At Ditto, we've been steadily enhancing the Ditto Portal with new features. When the Ditto Portal was first launched, it included a "Data Browser" feature that allowed developers to quickly view information stored within it.

Since then, the development team has focused on building a suite of features that enable developers to create, read, update, and delete information directly from the portal using DQL. This led to the creation of the new DQL Editor, which offers many new functionalities you might not be aware of. If you're still using the older Data Browser, we highly recommend transitioning to the new DQL Editor. We understand that changing tools can be challenging, so let's explore how to perform common tasks in the DQL Editor compared to the legacy Data Browser.

Viewing Documents

In the old Data Browser, you would click on a collection in the right-hand pane of the UI to display a list of documents in that collection. Results could be viewed in a Table or an optional Tree view.

Figure 1: Legacy Data Browser viewing documents in a Collection

The new DQL Editor introduces two tabs for working with data: the Collection Data Browser and the DQL Editor. If your goal is to inspect documents within a specific collection, you can continue to use the Collection Data Browser by selecting a collection name. Documents are displayed in a tabular format, and selecting a row opens the corresponding document in the JSON Document Viewer, preserving the familiar behavior of the legacy Data Browser.

Figure 2: DQL Editor - Collection View with JSON Document Viewer open

Alternatively, you can use the new DQL Editor tab. Selecting a collection here will auto-generate the DQL statement for returning the documents in that collection, which you can then execute by clicking the "Run query" button.

By default, the DQL Editor's result pane will display data in JSON format, similar to the older Tree view in the legacy Data Browser. The result pane also supports a Table view, which functions identically to the new table view in the Collection Data Browser, allowing you to click on an item in the table to bring up the JSON Document Viewer.

Figure 3: DQL Editor - DQL Select statement executed with JSON viewer in the results pane

Filtering Documents

A common task for developers using the Ditto Portal is querying documents based on specific conditions. The legacy Data Browser provided basic filtering capabilities through a search box that accepted conditional statements. For example, you could query for documents where the city field equals "Atlanta" or combine conditions, such as city == "Atlanta" or city == "Austin". While functional, this approach required learning a custom query syntax with limited expressiveness. As filter complexity increased, the constraints of the search bar quickly became apparent.

Figure 4: Legacy Data Browser filtering documents

The DQL Editor leverages the full power of the DQL query language, enabling developers to construct precise and expressive filters for document retrieval. DQL is inspired by SQL—the industry-standard language for querying datasets since the 1970s—but is tailored for working with document-oriented data. Unlike the legacy Data Browser’s limited search bar, DQL supports robust querying semantics. For example, where languages like JavaScript use == for equality checks, DQL uses a single = operator, aligning with traditional SQL conventions. Below are some of the most useful features of DQL that significantly streamline querying and data inspection.

LIKE Statement

The LIKE statement in DQL enables pattern matching against string values, making it ideal for filtering documents based on partial string matches. For example, consider a dataset where each location has openHour and closeHour fields stored as 24-hour time strings. To find all locations that open between 10:00 and 11:00 AM, you can use the following query:

SELECT * FROM `locations` WHERE openHour LIKE '10:%' OR openHour = '11:00'


This query matches any openHour value that begins with 10: (e.g., 10:00, 10:30) using the LIKE '10:%' pattern, and includes locations that open exactly at 11:00 using a simple equality condition. The LIKE operator can be used to match substrings at any position using % as a wildcard. DQL also provides the ILIKE statement, which is a case-insensitive variant of the LIKE statement.  For more details on using LIKE, refer to the Ditto DQL documentation.

IN Statement

The IN operator in DQL allows you to filter documents by checking whether a field’s value exists within a specified set of values. For example, to retrieve all locations where the state field is either 'Georgia' or 'Texas', you can use the following query:

SELECT * FROM `locations` WHERE state IN ('GA', 'TX') AND openHour LIKE '10:%' OR openHour = '11:00'

When combined with additional conditions using logical operators like AND, the IN clause enables concise and highly expressive filtering. This is especially useful when matching against predefined value sets without the need for multiple OR conditions.  For a list of collection operators, refer to the Ditto documentation.

Comparison Operators

Ditto’s documentation provides a comprehensive list of comparison operators available in DQL. A common challenge for developers transitioning from relational databases—where schemas are fixed—is adapting to the flexible, schema-less nature of document databases. In this context, the IS MISSING and IS NOT MISSING operators are invaluable for querying documents based on the presence or absence of specific fields.

For example, to retrieve all documents where the address2 field is not defined, you can use the following query:

SELECT * FROM `locations` WHERE address2 IS MISSING


This approach enables developers to omit optional fields like address2 when no data is available, reducing storage overhead and eliminating the need to check for NULL or empty string values at query time.

New Features

The DQL Editor introduces a range of powerful capabilities that go beyond what was possible in the legacy Data Browser. These enhancements are designed to streamline common workflows and provide a more developer-friendly experience for working with document data.  I’ll list out some of my favorite new features below.

Query History and Favorites

The new DQL Editor has a new feature that will save all queries you write in a History list and allow you to favorite your most common queries so you don’t have to remember or separately track complex queries. The list of History and Favorites can be found on the Queries pane to the right of the DQL Editor pane.  To add a query from history to your favorites you can use the … button.  

Figure 5: Queries Pane with History listed

Import

The DQL Editor supports importing information into a collection, allowing you to quickly add in sample data for testing with your applications.  During the import process you can select an existing collection OR have it create a new collection during the import process.  You can find the Import button on the navigation toolbar in the upper right hand corner of the DQL Editor.

Figure 6: Import button highlighted for importing data into a collection


Export

The DQL Editor results pane supports exporting information from an executed query into a JSON or CSV file.  The Export query result button can be found in the upper right hand corner of the query results pane.

Figure 7: Export query results button for exporting data

DQL Support for Inserting, Updating, and Deleting Documents

The legacy Data Browser functioned primarily as a read-only interface for inspecting documents. In contrast, the DQL Editor supports full read-write operations via the DQL language, enabling developers to not only query data but also insert, update, and delete documents directly. Detailed usage examples and syntax guidelines for these operations are available in the Ditto documentation.

Strict Mode

The DQL Editor provides a setting button for enabling or disabling Strict Mode.  

Figure 8: Strict Mode set to disabled

With strict mode enabled, all fields are treated as a register by default. When enabled, every field in a document must match the collection definition exactly — including its CRDT type (e.g., map, register, counter).  Disabling strict mode enables new functionality: when turned off, collection definitions are no longer required. SELECT queries will return and display all fields by default. This matches the behavior of the legacy Data Browser.  You can find more information about strict mode in the Ditto Documentation.

Summary

The DQL Editor offers expanded capabilities for developers to create, read, update, and delete information directly within the portal using DQL (Ditto Query Language). While the old Data Browser focused primarily on viewing data, the DQL Editor provides a more robust and interactive experience.

Read more
Stories
July 14, 2025
Dorsey’s Bitchat is New, the Underlying Technology Isn’t
by
Ryan Ratner
Jack Dorsey’s Bitchat introduces peer-to-peer messaging that works even without the internet. Ditto, with similar underlying technology, has been growing into the enterprise for years. How do they compare, and what would it look like if Bitchat used Ditto?
Announcement
July 9, 2025
Ditto's Query Language is Getting More Powerful
by
Rae McKelvey
This post is part of our broader effort to help teams transition from legacy query tools and stay successful with Ditto’s modern DQL experience.