DQL Roadmap Functionality

🚧 The functionality in this article is in active development and NOT supported in this version of the DQL language.

This document outlines functionality in the DQL language that is in active development. This is not an exhaustive list of the features and functionality the Ditto team is tracking concerning DQL and aims to address larger functionality gaps.

All syntax included in this article is sudo syntax added to express functionality. The final syntax may differ from the syntax included here.



🚧 Projections

A projection refers to an operation of selecting specific fields from a collection in a query result by allowing you to specify which fields you want to include in the output of a query while excluding others.

DQL



🚧 Aggregates

Applied most commonly to grouped data or the entire result set of a query, use aggregation functions to perform calculations on a set of values and produce a single result, as well as summarize data across multiple documents in a collection.

Aggregate operations: COUNT SUM MAX MIN AVG

DQL


🚧 GROUP BY

The GROUP BY clause is used to group documents based on one or more fields in a query. It allows you to group data together based on common values in specific fields and perform aggregate calculations on those groups.

DQL


🚧 HAVING

The HAVING clause is used in conjunction with the GROUP BY clause to filter the result of a query based on conditions involving aggregate functions. The HAVING clause allows you to apply filtering conditions to the grouped data in a query.

DQL



🚧 Aliasing

Aliasing allows users to assign a temporary name or alias to a collection or field in a query. Aliases are assigned using the AS keyword followed by the alias.

Aliasing a collection

DQL


Aliasing a field

DQL



🚧 Multiple FROM Terms

Multiple FROM terms can be used to refer to multiple collections within a query. When you include multiple FROM terms, the result is a cross-product of the collections. This results in a larger result set that includes all possible combinations.

DQL



🚧 JOINs

Joins are used to combine documents from two or more tables based on a related fields between them.

Join types include: LEFT JOIN INNER JOIN CROSS JOIN RIGHT JOIN OUTER JOIN

DQL



🚧 INSERT with CBOR

The INSERT INTO statement will support CBOR serialized data.

CBOR data is declared using CBOR keyword prior to the CBOR object.

JS



🚧 Secondary Indexing

An index is a data structure that enhances the efficiency of queries by providing a faster lookup mechanism for retrieving data based on specific attributes or fields. An index allows DQL to locate and access data more quickly, reducing the need for scanning the entire collection or table.

DQL

DQL

DQL



🚧 Pre-Defined Type Definitions

Setting a pre-defined type definition will allow users to set a type definition once for a given collection instead of needing to declare it within each query.

DQL



🚧 Cross Collection Transactions

Cross collection atomic modifications allows for multiple modifications to occur across transactions.

SQL