Skip to content

Commit 4ed7004

Browse files
authored
Merge pull request #10652 from eng-myousif/dux/717-document-OQL-comments
Add support for comments in OQL syntax
2 parents 8f0616e + c48e335 commit 4ed7004

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • content/en/docs/refguide/modeling/domain-model/oql

content/en/docs/refguide/modeling/domain-model/oql/_index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ Identifiers are used for module, entity, attribute, association, and alias names
3636

3737
Multiple identifiers can be composed into a path, separated by special characters `.` and `/`. The `.` special character can be used to indicate the module and entity in the form `Module.Entity`. The `/` special character can be used to indicate the attribute of an entity in the form `Module.Entity/Attribute` and it can be used for separating associations in long paths. Examples of paths can be seen in the [Select from Multiple Tables using JOIN](/refguide/oql-clauses/#join) section of *OQL Clauses*.
3838

39+
In Mendix version 11.7.0 and above, comments can be used in OQL queries to improve readability. Comments are ignored during query execution. There are two ways to add comments:
40+
41+
* Single-line comments start with `--`.
42+
* Multi-line comments are enclosed by `/*` and `*/` and support nesting.
43+
3944
### Reserved Words {#reserved-oql-words}
4045

4146
Words with a specific purpose in OQL are reserved. If you use reserved words for entity, variable, or attribute names in an OQL query, they must be wrapped in double quotes `" "`. For example, in the OQL query `SELECT AVG(TotalPrice) FROM Sales."Order" WHERE IsPaid = 1`, `Order` needs to be wrapped in quotes because it is a reserved word, as it can be used to `ORDER BY`.

0 commit comments

Comments
 (0)