@sap/cds-compiler 3.6.2 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +109 -1
- package/README.md +3 -0
- package/bin/cdsc.js +12 -5
- package/doc/CHANGELOG_ARCHIVE.md +6 -6
- package/doc/CHANGELOG_BETA.md +35 -2
- package/doc/CHANGELOG_DEPRECATED.md +2 -2
- package/doc/DeprecatedOptions_v2.md +1 -1
- package/doc/NameResolution.md +1 -1
- package/lib/api/main.js +63 -23
- package/lib/api/options.js +1 -0
- package/lib/api/validate.js +5 -0
- package/lib/base/dictionaries.js +15 -3
- package/lib/base/keywords.js +2 -0
- package/lib/base/message-registry.js +120 -34
- package/lib/base/messages.js +51 -27
- package/lib/base/model.js +4 -2
- package/lib/base/shuffle.js +2 -1
- package/lib/checks/arrayOfs.js +1 -1
- package/lib/checks/defaultValues.js +1 -1
- package/lib/checks/elements.js +29 -1
- package/lib/checks/{emptyOrOnlyVirtual.js → hasPersistedElements.js} +10 -6
- package/lib/checks/invalidTarget.js +1 -1
- package/lib/checks/nonexpandableStructured.js +1 -1
- package/lib/checks/onConditions.js +15 -9
- package/lib/checks/sql-snippets.js +2 -2
- package/lib/checks/types.js +5 -1
- package/lib/checks/validator.js +7 -3
- package/lib/compiler/assert-consistency.js +42 -26
- package/lib/compiler/base.js +50 -4
- package/lib/compiler/builtins.js +17 -8
- package/lib/compiler/checks.js +241 -246
- package/lib/compiler/define.js +113 -146
- package/lib/compiler/extend.js +889 -383
- package/lib/compiler/finalize-parse-cdl.js +5 -58
- package/lib/compiler/index.js +1 -1
- package/lib/compiler/kick-start.js +7 -8
- package/lib/compiler/populate.js +297 -293
- package/lib/compiler/propagator.js +27 -18
- package/lib/compiler/resolve.js +146 -463
- package/lib/compiler/shared.js +36 -79
- package/lib/compiler/tweak-assocs.js +30 -28
- package/lib/compiler/utils.js +31 -5
- package/lib/edm/annotations/genericTranslation.js +131 -59
- package/lib/edm/annotations/preprocessAnnotations.js +3 -0
- package/lib/edm/csn2edm.js +22 -5
- package/lib/edm/edm.js +6 -4
- package/lib/edm/edmAnnoPreprocessor.js +1 -0
- package/lib/edm/edmPreprocessor.js +42 -26
- package/lib/gen/Dictionary.json +38 -2
- package/lib/gen/language.checksum +1 -1
- package/lib/gen/language.interp +3 -1
- package/lib/gen/languageLexer.js +1 -1
- package/lib/gen/languageParser.js +4828 -4472
- package/lib/inspect/inspectPropagation.js +20 -34
- package/lib/json/from-csn.js +140 -44
- package/lib/json/to-csn.js +114 -122
- package/lib/language/errorStrategy.js +2 -0
- package/lib/language/genericAntlrParser.js +156 -36
- package/lib/language/language.g4 +100 -58
- package/lib/language/textUtils.js +13 -0
- package/lib/main.d.ts +43 -3
- package/lib/main.js +4 -2
- package/lib/model/csnRefs.js +15 -3
- package/lib/model/csnUtils.js +12 -74
- package/lib/model/revealInternalProperties.js +4 -2
- package/lib/modelCompare/compare.js +2 -1
- package/lib/optionProcessor.js +3 -0
- package/lib/render/manageConstraints.js +5 -2
- package/lib/render/toCdl.js +216 -104
- package/lib/render/toHdbcds.js +2 -9
- package/lib/render/toRename.js +14 -51
- package/lib/render/toSql.js +4 -3
- package/lib/render/utils/common.js +9 -5
- package/lib/transform/braceExpression.js +6 -0
- package/lib/transform/db/assertUnique.js +2 -1
- package/lib/transform/db/expansion.js +2 -0
- package/lib/transform/db/flattening.js +37 -36
- package/lib/transform/db/rewriteCalculatedElements.js +600 -0
- package/lib/transform/db/transformExists.js +4 -0
- package/lib/transform/db/views.js +40 -37
- package/lib/transform/forOdataNew.js +20 -15
- package/lib/transform/forRelationalDB.js +58 -41
- package/lib/transform/odata/typesExposure.js +50 -15
- package/lib/transform/parseExpr.js +16 -8
- package/lib/transform/transformUtilsNew.js +42 -14
- package/lib/transform/translateAssocsToJoins.js +60 -37
- package/lib/transform/universalCsn/coreComputed.js +15 -7
- package/lib/transform/universalCsn/universalCsnEnricher.js +4 -4
- package/package.json +2 -1
package/lib/gen/Dictionary.json
CHANGED
|
@@ -512,6 +512,14 @@
|
|
|
512
512
|
],
|
|
513
513
|
"$experimental": true
|
|
514
514
|
},
|
|
515
|
+
"Common.IsTimezone": {
|
|
516
|
+
"Type": "Core.Tag",
|
|
517
|
+
"AppliesTo": [
|
|
518
|
+
"Property",
|
|
519
|
+
"Parameter"
|
|
520
|
+
],
|
|
521
|
+
"$experimental": true
|
|
522
|
+
},
|
|
515
523
|
"Common.IsDigitSequence": {
|
|
516
524
|
"Type": "Core.Tag",
|
|
517
525
|
"AppliesTo": [
|
|
@@ -1376,6 +1384,16 @@
|
|
|
1376
1384
|
"Function"
|
|
1377
1385
|
]
|
|
1378
1386
|
},
|
|
1387
|
+
"Core.RequiresExplicitBinding": {
|
|
1388
|
+
"Type": "Core.Tag",
|
|
1389
|
+
"AppliesTo": [
|
|
1390
|
+
"Action",
|
|
1391
|
+
"Function"
|
|
1392
|
+
]
|
|
1393
|
+
},
|
|
1394
|
+
"Core.ExplicitOperationBindings": {
|
|
1395
|
+
"Type": "Collection(Core.QualifiedBoundOperationName)"
|
|
1396
|
+
},
|
|
1379
1397
|
"Core.SymbolicName": {
|
|
1380
1398
|
"Type": "Core.SimpleIdentifier"
|
|
1381
1399
|
},
|
|
@@ -1457,30 +1475,35 @@
|
|
|
1457
1475
|
"Measures.ISOCurrency": {
|
|
1458
1476
|
"Type": "Edm.String",
|
|
1459
1477
|
"AppliesTo": [
|
|
1478
|
+
"Parameter",
|
|
1460
1479
|
"Property"
|
|
1461
1480
|
]
|
|
1462
1481
|
},
|
|
1463
1482
|
"Measures.Scale": {
|
|
1464
1483
|
"Type": "Edm.Byte",
|
|
1465
1484
|
"AppliesTo": [
|
|
1485
|
+
"Parameter",
|
|
1466
1486
|
"Property"
|
|
1467
1487
|
]
|
|
1468
1488
|
},
|
|
1469
1489
|
"Measures.Unit": {
|
|
1470
1490
|
"Type": "Edm.String",
|
|
1471
1491
|
"AppliesTo": [
|
|
1492
|
+
"Parameter",
|
|
1472
1493
|
"Property"
|
|
1473
1494
|
]
|
|
1474
1495
|
},
|
|
1475
1496
|
"Measures.UNECEUnit": {
|
|
1476
1497
|
"Type": "Edm.String",
|
|
1477
1498
|
"AppliesTo": [
|
|
1499
|
+
"Parameter",
|
|
1478
1500
|
"Property"
|
|
1479
1501
|
]
|
|
1480
1502
|
},
|
|
1481
1503
|
"Measures.DurationGranularity": {
|
|
1482
1504
|
"Type": "Measures.DurationGranularityType",
|
|
1483
1505
|
"AppliesTo": [
|
|
1506
|
+
"Parameter",
|
|
1484
1507
|
"Property"
|
|
1485
1508
|
]
|
|
1486
1509
|
},
|
|
@@ -3360,6 +3383,10 @@
|
|
|
3360
3383
|
"$kind": "TypeDefinition",
|
|
3361
3384
|
"UnderlyingType": "Edm.String"
|
|
3362
3385
|
},
|
|
3386
|
+
"Core.QualifiedBoundOperationName": {
|
|
3387
|
+
"$kind": "TypeDefinition",
|
|
3388
|
+
"UnderlyingType": "Edm.String"
|
|
3389
|
+
},
|
|
3363
3390
|
"Core.LocalDateTime": {
|
|
3364
3391
|
"$kind": "TypeDefinition",
|
|
3365
3392
|
"UnderlyingType": "Edm.String"
|
|
@@ -3455,6 +3482,7 @@
|
|
|
3455
3482
|
"Border": "Edm.Boolean",
|
|
3456
3483
|
"FitToPage": "Edm.Boolean",
|
|
3457
3484
|
"Padding": "Edm.Boolean",
|
|
3485
|
+
"HeaderFooter": "Edm.Boolean",
|
|
3458
3486
|
"ResultSizeDefault": "Edm.Int32",
|
|
3459
3487
|
"ResultSizeMaximum": "Edm.Int32"
|
|
3460
3488
|
}
|
|
@@ -3512,6 +3540,10 @@
|
|
|
3512
3540
|
"UserID": {
|
|
3513
3541
|
"Value": "UserID",
|
|
3514
3542
|
"Type": "String"
|
|
3543
|
+
},
|
|
3544
|
+
"EndOfPurposeDate": {
|
|
3545
|
+
"Value": "EndOfPurposeDate",
|
|
3546
|
+
"Type": "String"
|
|
3515
3547
|
}
|
|
3516
3548
|
},
|
|
3517
3549
|
"Symbols": {}
|
|
@@ -3939,7 +3971,7 @@
|
|
|
3939
3971
|
"$kind": "ComplexType",
|
|
3940
3972
|
"BaseType": "UI.DataFieldForActionAbstract",
|
|
3941
3973
|
"Properties": {
|
|
3942
|
-
"Action": "
|
|
3974
|
+
"Action": "UI.ActionName",
|
|
3943
3975
|
"InvocationGrouping": "UI.OperationGroupingType",
|
|
3944
3976
|
"Inline": "Edm.Boolean",
|
|
3945
3977
|
"Determining": "Edm.Boolean",
|
|
@@ -3994,7 +4026,7 @@
|
|
|
3994
4026
|
"BaseType": "UI.DataField",
|
|
3995
4027
|
"Properties": {
|
|
3996
4028
|
"Value": "Edm.PrimitiveType",
|
|
3997
|
-
"Action": "
|
|
4029
|
+
"Action": "UI.ActionName",
|
|
3998
4030
|
"Label": "Edm.String",
|
|
3999
4031
|
"Criticality": "UI.CriticalityType",
|
|
4000
4032
|
"CriticalityRepresentation": "UI.CriticalityRepresentationType",
|
|
@@ -4258,6 +4290,10 @@
|
|
|
4258
4290
|
"Symbols": {}
|
|
4259
4291
|
}
|
|
4260
4292
|
},
|
|
4293
|
+
"UI.ActionName": {
|
|
4294
|
+
"$kind": "TypeDefinition",
|
|
4295
|
+
"UnderlyingType": "Edm.String"
|
|
4296
|
+
},
|
|
4261
4297
|
"Validation.AllowedValue": {
|
|
4262
4298
|
"$kind": "ComplexType",
|
|
4263
4299
|
"Properties": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
371decdc6899d80e3420038878ed211c
|