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.
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.
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
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.
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.
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
Aliasing a field
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.
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
The INSERT INTO statement will support CBOR serialized data.
CBOR data is declared using CBOR keyword prior to the CBOR object.
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.
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.
Cross collection atomic modifications allows for multiple modifications to occur across transactions.