Skip to content

Commit

Permalink
Merge branch 'main' into troubleshoot-readiness-check
Browse files Browse the repository at this point in the history
  • Loading branch information
renejeglinsky authored Jan 21, 2025
2 parents 3319c81 + 3afe228 commit f12024d
Show file tree
Hide file tree
Showing 14 changed files with 664 additions and 471 deletions.
17 changes: 10 additions & 7 deletions cds/cxn.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,18 @@ _operator = string
Examples:

```js
cds.parse.expr(`x<9`) ==//> returns:
[dev] cds repl
> cds.parse.expr(`x<9`) ==
{xpr:[ {ref:['x']}, '<', {val:9} ]}

cds.parse.expr(`x<9 and (y=1 or z=2)`) ==//> returns:
> cds.parse.expr(`x<9 and (y=1 or z=2)`) ==
{xpr:[
{ref:['x']}, '<', {val:9}, 'and', {xpr:[
{ref:['y']}, '=', {val:1}, 'or', {ref:['z']}, '=', {val:2}
]}
]}

cds.parse.expr(`exists books[year = 2000]`) ==//> returns:
> cds.parse.expr(`exists books[year = 2000]`) ==
{xpr:[
'exists',
{ref: [ {id:'books', where:[ {'ref':['year']}, '=', {'val': 2000} ]}]}
Expand All @@ -160,7 +161,8 @@ As an exception to that rule, CDS supports the ternary conditional operator on s
but immediately converts it to the corresponding CASE expression in CXN:

```js
cds.parse.expr(`x<10 ? y : z`) ==//> returns:
[dev] cds repl
> cds.parse.expr(`x<10 ? y : z`) ==
{xpr:['case', 'when', {ref:['x']}, '<', {val:10},
'then', {ref:['y']}, 'else', {ref:['z']}, 'end']}
```
Expand All @@ -177,9 +179,10 @@ param = { ref:[ '?' | number | name ], param:true }

Examples:
```js
cds.parse.expr(`x=:1`) == [{ref:['x']}, '=', {ref:[1], param:true}]
cds.parse.expr(`x=:y`) == [{ref:['x']}, '=', {ref:['y'], param:true}]
cds.parse.expr(`x=?`) == [{ref:['x']}, '=', {ref:['?'], param:true}]
[dev] cds repl
> cds.parse.expr(`x=:1`) //> [{ref:['x']}, '=', {ref:[1], param:true}]
> cds.parse.expr(`x=:y`) //> [{ref:['x']}, '=', {ref:['y'], param:true}]
> cds.parse.expr(`x=?`) //> [{ref:['x']}, '=', {ref:['?'], param:true}]
```

## Sub Queries
Expand Down
7 changes: 4 additions & 3 deletions guides/databases-sqlite.md
Original file line number Diff line number Diff line change
Expand Up @@ -611,9 +611,10 @@ entity Foo {
The behaviour has changed to:

```js
SELECT.from('Foo') //> [{ foo:1, bar:null }, ...] // [!code --]
SELECT.from('Foo') //> [{ foo:1 }, ...]
SELECT('bar').from('Foo') //> ERROR: no columns to read
[dev] cds repl
> SELECT.from('Foo') //> [{ foo:1, bar:null }, ...] // [!code --]
> SELECT.from('Foo') //> [{ foo:1 }, ...]
> SELECT('bar').from('Foo') //> ERROR: no columns to read
```

### <> Operator {.node}
Expand Down
2 changes: 1 addition & 1 deletion guides/domain-modeling.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ type Genre : String enum {

CDS Aspects and Annotations provide powerful means for **separation of concerns**. This greatly helps to keep our core domain model clean, while putting secondary concerns into separate files and model fragments. → Find details in chapter [Aspects](#aspects) below.

### Fueling Generic Providers
### Fuelling Generic Providers

As depicted in the illustration below, domain models serve as the sources for persistence models, deployed to databases, as well as the underlying model for services acting as API facades to access data.

Expand Down
2 changes: 1 addition & 1 deletion guides/i18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ So, the complete stack of overlaid models for the given example would look like
| *srv/my-service.cds* | service definition |
| *db/schema.cds* | underlying data model |

::: tip _Note_ <!-- -->
::: tip Set default language
The _default language_ is usually `en` but can be overridden by configuring <Config>cds.i18n.default_language</Config> in your project's _package.json_.
:::

Expand Down
12 changes: 8 additions & 4 deletions guides/multitenancy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1019,14 +1019,18 @@ The Boolean values above activate the default configuration in `@sap/cds-mtxs`:
```json
"cds": {
"requires": {
"audit-log": {
// Uses credentials.uaa.xsappname
"subscriptionDependency": { "uaa": "xsappname" }
},
"connectivity": {
// Uses credentials.xsappname
"vcap": { "label": "connectivity" },
"subscriptionDependency": "xsappname"
},
"portal": {
"vcap": { "label": "portal" },
// Uses credentials.uaa.xsappname
"subscriptionDependency": {
"uaa": "xsappname"
}
},
...
}
}
Expand Down
4 changes: 4 additions & 0 deletions java/developing-applications/running.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ Once this is added, you can use the restart capabilities of the Spring Boot Devt
* Artifacts generated from CDS (schema.sql, CSN, EDMX)
* Any other static resource

::: warning Restart for changed Java classes
Spring Boot Devtools only detects changes to .class files. You need to enable the *automatic build* feature in your IDE which detects source file changes and rebuilds the .class file. If not, you have to manually rebuild your project to restart your CAP Java application.
:::

### CDS Build

The Spring Boot Devtools have no knowledge of any CDS tooling or the CAP Java runtime. Thus, they can't trigger a CDS build if there are changes in the CDS source files. For more information, please check the [Local Development Support](#local-development-support) section.
Expand Down
2 changes: 1 addition & 1 deletion java/event-handlers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ It is possible to specify multiple service names. Event handlers are registered

<!-- java-mode: ignore, no annotation target -->
```java
@ServiceName(["AdminService", "CatalogService"])
@ServiceName({"AdminService", "CatalogService"})
```

The `type` attribute of the `@ServiceName` annotation can be used to register event handlers on all services of a certain type:
Expand Down
17 changes: 10 additions & 7 deletions node.js/cds-compile.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,10 @@ Parses a source string in CQL expression syntax and returns it as a parsed expre

Examples:
```js
let cxn = cds.parse.expr (`foo.bar > 9`)
let cxn = cds.parse.expr `foo.bar > 9`
//> {xpr:[ {ref:['foo', 'bar']}, '>', {val:9} ] }
[dev] cds repl
> let cxn = cds.parse.expr (`foo.bar > 9`)
> let cxn = cds.parse.expr `foo.bar > 9` //> both return:
{xpr:[ {ref:['foo', 'bar']}, '>', {val:9} ] }
```


Expand All @@ -339,8 +340,9 @@ Convenience shortcut to `cds.parse.expr(x).xpr`

Example:
```js
let xpr = cds.parse.xpr (`foo.bar > 9`)
//> [ {ref:['foo', 'bar']}, '>', {val:9} ]
[dev] cds repl
> let xpr = cds.parse.xpr (`foo.bar > 9`) // [!code focus]
[ {ref:['foo', 'bar']}, '>', {val:9} ]
```


Expand All @@ -351,8 +353,9 @@ Convenience shortcut to `cds.parse.expr(x).ref`

Example:
```js
let ref = cds.parse.ref (`foo.bar`)
//>= ['foo', 'bar']
[dev] cds repl
> let ref = cds.parse.ref (`foo.bar`) // [!code focus]
['foo', 'bar']
```


Expand Down
Loading

0 comments on commit f12024d

Please sign in to comment.