Skip to content

Commit 5d398ef

Browse files
Align usage of different subqueries in title and sentences (#1412)
We are/were inconsistent in our usage. ![image](https://github.com/user-attachments/assets/7d7a522e-dbc4-4747-aa98-b68a42ef9366) vs. ![image](https://github.com/user-attachments/assets/18f95397-877f-4900-a328-482b5e27dba5) Also in sentences we used a mix: ![image](https://github.com/user-attachments/assets/9441ce54-4728-41f7-a500-cf7078e8328d) This PR tries to align those things as follows: - Uppercase in titles - Monospace on FROM etc and not on subquery - Lowercase in sentences
1 parent 16fd96a commit 5d398ef

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

java/working-with-cql/query-api.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ Constant literals are directly rendered into SQL and therefore **must not** cont
253253

254254
The source of the select statement determines the data set to which the query is applied. It's specified by the `from` method.
255255

256-
#### From `entity set` {#from-entity-set}
256+
#### `FROM` Entity Set {#from-entity-set}
257257

258258
Typically a select statement selects from an [entity set](#target-entity-sets):
259259

@@ -269,7 +269,7 @@ CqnSelect query = Select.from("bookshop.Books")
269269
.columns("title", "author.name");
270270
```
271271

272-
#### From `reference` {#from-reference}
272+
#### `FROM` Reference {#from-reference}
273273

274274
The source can also be defined by a [path expression](#path-expressions) referencing an entity set.
275275

@@ -287,7 +287,7 @@ import static bookshop.Bookshop_.ORDERS;
287287
Select.from(ORDERS, o -> o.filter(o.ID().eq(23)).items());
288288
```
289289

290-
#### From `subquery` {#from-select}
290+
#### `FROM` Subquery {#from-select}
291291

292292
It's also possible to execute a nested select where an _outer_ query operates on the result of a _subquery_.
293293

@@ -1885,8 +1885,8 @@ Select.from(AUTHORS).where(a -> a.books().anyMatch(
18851885

18861886
#### `EXISTS` Subquery {#exists-subquery}
18871887

1888-
An `EXISTS` subquery is used to test if a subquery returns any records. Typically a subquery is correlated with the enclosing _outer_ query.
1889-
You construct an `EXISTS` subquery with the [`exists`](https://javadoc.io/doc/com.sap.cds/cds4j-api/latest/com/sap/cds/ql/StructuredType.html#exists-java.util.function.Function-) method, which takes a [function](#lambda-expressions) that creates the subquery from a reference to the _outer_ query. To access elements of the outer query from within the subquery, this _outer_ reference must be used:
1888+
An `exists` subquery is used to test if a subquery returns any records. Typically a subquery is correlated with the enclosing _outer_ query.
1889+
You construct an `exists` subquery with the [`exists`](https://javadoc.io/doc/com.sap.cds/cds4j-api/latest/com/sap/cds/ql/StructuredType.html#exists-java.util.function.Function-) method, which takes a [function](#lambda-expressions) that creates the subquery from a reference to the _outer_ query. To access elements of the outer query from within the subquery, this _outer_ reference must be used:
18901890

18911891
```java
18921892
import static bookshop.Bookshop_.AUTHORS;
@@ -1919,7 +1919,7 @@ Select.from("Authors").where(CQL.exists(subquery));
19191919
19201920
### `IN` Subquery
19211921

1922-
An `IN` subquery is used to test if an element (or tuple of elements) of an outer query is contained in the result of a subquery. You can use an `IN` subquery in fluent style or in tree style:
1922+
An `in` subquery is used to test if an element (or tuple of elements) of an outer query is contained in the result of a subquery. You can use an `in` subquery in fluent style or in tree style:
19231923

19241924
```java
19251925
// fluent style

0 commit comments

Comments
 (0)