dqMan Proprietary Statements
The proprietary statements provided by dqMan simplify the user's tasks by employing a language that closely resembles SQL.
Distinguished by the dqMan logo, these proprietary statements are visually marked on the corresponding query row.
dqMan empowers users by enabling them to utilize select *, group by, order by, count, as well as descriptions of various fields or relations.
Select statement extensions
Selecting all queryable fields
The SELECT * statement is used to retrieve all queryable fields from a specified target. In the given examples, SELECT * is used to fetch all queryable fields from the targets "user__sys," "group__sys," and "binder_node__sys."
Counting the objects in a query:
The COUNT(*) function is used to calculate the number of rows returned by a query. In the provided example, the COUNT(*) function is used to count the records in the "documents" where the "type__v" column is equal to 'Clinical.'
Caching the query results in a local table:
The INTO clause is used to store the results of a query into a local table. In the given example, the query results from selecting specific columns from the "documents" table, where the "type__v" column is equal to 'Clinical,' are stored in a local table named "local_clinical."
Querying local tables by using the full SQLite syntax
After storing query results in a local table, regular SQL syntax, specifically SQLite syntax in this case, can be used to query the local table. The provided example demonstrates a SELECT statement on the "local_clinical" table, where the results are grouped by "subtype__v" and "classification__v," while also counting the number of documents using the COUNT function.
The full syntax for querying the local tables can be found here: https://www.sqlite.org/lang_select.html
DESCRIBE command
Syntax:
Describe <type> [fields|relations] [all|custom]
Describe <[\]doc_type[\doc_subtype[\doc_classification]]> [all|custom]
Arguments:
Examples:
Describing object and document relations:
The DESCRIBE statement is used to obtain information about relations of an object in the system. In the given examples, the DESCRIBE statement is used to retrieve information about the relations of objects such as "activity__v" and "user__sys."
Describing document and object fields:
To view all fields of a document or object type in the results grid, users can utilize the "describe" command. The syntax for the "describe" command is as follows:
DESCRIBE object | []doc_type [\doc_subtype [\doc_classification]] [[[ALL|CUSTOM] FIELDS]]
In the provided example, the DESCRIBE statement is used to retrieve information about the fields of the "\regulatory__c" document type, including both standard and custom fields.