Published OnJuly 9, 2025July 9, 2025

Ditto's Query Language is Getting More Powerful

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.

What’s new?

  • Collection definitions are no longer required to write queries.
  • Nested maps will be returned by default

For example, this query:

SELECT *
FROM COLLECTION cars (metadata MAP, photo ATTACHMENT)
WHERE metadata.rating > 100

Becomes much simpler – you can now remove the  COLLECTION … (definition) part of the statement.

SELECT *
FROM cars 
WHERE metadata.rating > 100

This means that SELECT queries will return and display all fields by default. This matches the behavior of the legacy query language. When a field has multiple possible types, the most recently updated type is chosen. This improvement applies only to the query parser itself when a query is run, so does not alter your underlying data in Small Peers or in production apps.

Additionally, the default behavior of the DQL editor has been updated to support nested maps and attachments as native data types, which means.

Get started with DQL

If you rely on the legacy query builder due to limitations in previous DQL behavior, you can now update to the latest version of Ditto to use DQL.

  • Upgrade to Ditto version 4.11.1 and set DQL_STRICT_MODE to false.
  • Review the documentation to turn off Strict mode.
  • Read the transition guide with real-world examples of how to write DQL.
  • Schedule a comprehensive training for teams migrating from the legacy query builder to DQL with your customer success manager.
  • Get professional support if you’d like a Ditto engineer from our team to help you migrate directly.
  • In the DQL editor, if you want to revert to old behavior, use the strict mode toggle in the top-right of the editor UI.

Let us know how it’s going at support@ditto.live, or reach out to your customer success manager for more information.

What’s next?

  • Releases of 5.0 and later will no longer support the legacy query builder, and will turn off strict mode by default. But don’t fret – 4.12 will be our long term supported legacy release which we will support with bug fixes and security vulnerabilities for 18-24 months, so you will have time to migrate to DQL.
  • Support for popular ORMs to enable more safety while interacting with data in Ditto, similar to other query languages.
  • Projections, Indexes and JOINs to bring more speed and power to your queries.
  • Aggregates such as COUNT, SUM, MIN, MAX to enable powerful workflows with a lower memory footprint.

We’re here to ensure you get the most out of Ditto. Thank you for being part of what we’re building!

Read more
Announcement
Product
July 7, 2025
Ditto Acquires KeySquare Labs
by
Adam Fish
Eric Hanft
Expanding Tactical Radio Support and our Public Sector Business
When centralization becomes a liability
Product
June 30, 2025
When Centralization Becomes a Liability
by
Shiri Friedman
What 19th-century grain policies can teach us about modern app architecture