From fc6f383bcb54af739ecf721f8c9990c05918a988 Mon Sep 17 00:00:00 2001 From: pijuskri Date: Mon, 29 Dec 2025 11:34:47 +0100 Subject: [PATCH 1/3] Remove unused mention of reserved OQL statement keywords that are now used --- content/en/docs/refguide/modeling/domain-model/oql/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/refguide/modeling/domain-model/oql/_index.md b/content/en/docs/refguide/modeling/domain-model/oql/_index.md index 47a0ab82755..ad3470b114f 100644 --- a/content/en/docs/refguide/modeling/domain-model/oql/_index.md +++ b/content/en/docs/refguide/modeling/domain-model/oql/_index.md @@ -85,5 +85,5 @@ In OQL, `FLOAT` is a reserved word for legacy reasons. Mendix no longer supports {{% /alert %}} {{% alert color="info" %}} -In OQL, `DELETE`, `INSERT`, `REPLACE`, `UPDATE`, `UPSERT`, `INTO`, `SET`, `VALUES`, `IGNORE`, `MATCHED`, `DUPLICATE`, `KEY`, `CONFLICT`, `MERGE`, `USING`, `SOURCE`, `TARGET`, and `WITH` are reserved but not yet used. +In OQL, `REPLACE`, `UPSERT`, `SET`, `VALUES`, `IGNORE`, `MATCHED`, `DUPLICATE`, `KEY`, `CONFLICT`, `MERGE`, `USING`, `SOURCE`, `TARGET`, and `WITH` are reserved but not yet used. {{% /alert %}} From 5fce9e63435903cd9a61be28d8f630fbdaed3601 Mon Sep 17 00:00:00 2001 From: pijuskri Date: Mon, 29 Dec 2025 14:06:23 +0100 Subject: [PATCH 2/3] Add section about OQL syntax basics --- .../docs/refguide/modeling/domain-model/oql/_index.md | 10 +++++++++- .../modeling/domain-model/oql/oql-expression-syntax.md | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/content/en/docs/refguide/modeling/domain-model/oql/_index.md b/content/en/docs/refguide/modeling/domain-model/oql/_index.md index ad3470b114f..3f8e762ec96 100644 --- a/content/en/docs/refguide/modeling/domain-model/oql/_index.md +++ b/content/en/docs/refguide/modeling/domain-model/oql/_index.md @@ -28,7 +28,15 @@ OQL queries do not take security into account out-of-the-box. This means that yo You can try your OQL example online in the [OQL Playground](https://service.mendixcloud.com/p/OQL) demo app. {{% /alert %}} -## Reserved Words {#reserved-oql-words} +## Syntax basics + +An OQL statement is made of [keywords](#reserved-oql-words), identifiers, [value literals](#oql-literals) and [operators](#oql-operators). + +Identifiers are used for module, entity, attribute, association, alias names and parts of names in paths. Identifier parts are only allowed to contain latin characters (`a-Z`), underscores (`_`) and numbers (`0-9`). Numbers can not be used as for the first character of an identifier. Identifiers can be wrapped in double quotes `" "` to also allow special characters `.`, `/`, `@`. + +Multiple identifiers can be composed into a path, separated by special characters `.` and `/`. The `.` special character can be used to indicate the module an 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 [OQL clauses](#longpath) page. + +### Reserved Words {#reserved-oql-words} 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`. diff --git a/content/en/docs/refguide/modeling/domain-model/oql/oql-expression-syntax.md b/content/en/docs/refguide/modeling/domain-model/oql/oql-expression-syntax.md index 995b8256f5d..0702ea87d6b 100644 --- a/content/en/docs/refguide/modeling/domain-model/oql/oql-expression-syntax.md +++ b/content/en/docs/refguide/modeling/domain-model/oql/oql-expression-syntax.md @@ -42,7 +42,7 @@ OQL supports a set of data types that differ slightly from [Mendix data types](/ | `LONG` | Integer/Long | 5 | 64 bit width integer data | | `STRING` | String | 'my_string' | Textual data | -## Literals +## Literals {#oql-literals} Literals represent values that are constant and are part of the query itself. The supported literals are detailed below: @@ -120,7 +120,7 @@ FROM Sales.Person ``` -## Operators +## Operators {#oql-operators} Operators perform common operations and, unlike functions, do not put their parameters in parentheses. They take `expression` as input, which can be other operator results, functions, columns and literals. From f057fc8038e143a55915df46c55b976d3f80dd63 Mon Sep 17 00:00:00 2001 From: Mark van Ments <35492184+MarkvanMents@users.noreply.github.com> Date: Tue, 6 Jan 2026 13:31:16 +0100 Subject: [PATCH 3/3] Proofread --- .../en/docs/refguide/modeling/domain-model/oql/_index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/en/docs/refguide/modeling/domain-model/oql/_index.md b/content/en/docs/refguide/modeling/domain-model/oql/_index.md index 3f8e762ec96..e82c6031ca8 100644 --- a/content/en/docs/refguide/modeling/domain-model/oql/_index.md +++ b/content/en/docs/refguide/modeling/domain-model/oql/_index.md @@ -30,11 +30,11 @@ You can try your OQL example online in the [OQL Playground](https://service.mend ## Syntax basics -An OQL statement is made of [keywords](#reserved-oql-words), identifiers, [value literals](#oql-literals) and [operators](#oql-operators). +An OQL statement consists of [keywords](#reserved-oql-words), identifiers, [value literals](/refguide/oql-expression-syntax/#oql-literals) and [operators](/refguide/oql-expression-syntax/#oql-operators). -Identifiers are used for module, entity, attribute, association, alias names and parts of names in paths. Identifier parts are only allowed to contain latin characters (`a-Z`), underscores (`_`) and numbers (`0-9`). Numbers can not be used as for the first character of an identifier. Identifiers can be wrapped in double quotes `" "` to also allow special characters `.`, `/`, `@`. +Identifiers are used for module, entity, attribute, association, and alias names and parts of names in paths. Identifiers are only allowed to contain latin characters (`a-Z`), underscores (`_`) and numbers (`0-9`). Numbers can not be used as for the first character of an identifier. Identifiers can be wrapped in double quotes `" "` to allow special characters `.`, `/`, and `@`. -Multiple identifiers can be composed into a path, separated by special characters `.` and `/`. The `.` special character can be used to indicate the module an 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 [OQL clauses](#longpath) page. +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*. ### Reserved Words {#reserved-oql-words}