You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Working through this section to learn more, I came across a few places
that might benefit from very minor improvements. Thanks!
- 24:59:59 is just wishful thinking :)
- remove duplicated paragraph
- add tip about made-up annotations in example
- clarify ref to prev model
- make comma spacing consistent
---------
Co-authored-by: René Jeglinsky <rene.jeglinsky@sap.com>
Copy file name to clipboardExpand all lines: cds/cdl.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ The *Conceptual Definition Language (CDL)* is a human-readable language for defi
41
41
42
42
```cds
43
43
namespace capire.bookshop;
44
-
using { managed, cuid } from `@sap/cds/common`;
44
+
using { managed, cuid } from '@sap/cds/common';
45
45
aspect primary : managed, cuid {}
46
46
47
47
entity Books : primary {
@@ -85,7 +85,7 @@ The following literals can be used in CDL (mostly as in JavaScript, Java, and SQ
85
85
<!-- cds-mode: ignore; values only, no valid CDS file -->
86
86
```cds
87
87
true , false , null // as in all common languages
88
-
11 , 2.4 , 1e3, 1.23e-11 // for numbers
88
+
11 , 2.4 , 1e3, 1.23e-11 // for numbers
89
89
'A string''s literal' // for strings
90
90
`A string\n paragraph` // for strings with escape sequences
91
91
{ foo:'boo', bar:'car' } // for records
@@ -130,6 +130,10 @@ entity DocumentedEntity {
130
130
}
131
131
```
132
132
133
+
::: tip
134
+
These annotations are illustrative only and are not defined nor have any meaning beyond this example.
135
+
:::
136
+
133
137
Within those strings, escape sequences from JavaScript, such as `\t` or `\u0020`, are supported. Line endings are normalized. If you don't want a line ending at that position, end a line with a backslash (`\`). For string literals inside triple backticks, indentation is stripped and tagging is possible.
134
138
135
139
@@ -238,7 +242,7 @@ context scoped {
238
242
239
243
You can define types and entities with other definitions' names as prefixes:
240
244
241
-
```cds
245
+
```cds [prefixes.cds]
242
246
namespace foo.bar;
243
247
entity Foo {} //> foo.bar.Foo
244
248
entity Foo.Bar {} //> foo.bar.Foo.Bar
@@ -248,7 +252,7 @@ type Foo.Bar.Car {} //> foo.bar.Foo.Bar.Car
248
252
249
253
#### Fully Qualified Names
250
254
251
-
A model ultimately is a collection of definitions with unique, fully qualified names. For example, the second model above would compile to this[CSN](./csn):
255
+
A model ultimately is a collection of definitions with unique, fully qualified names. For example, the model in `contexts.cds`would compile to the following[CSN](./csn):
0 commit comments