From d4279a2d9f191520f6cedf78c007f826d6391b6e Mon Sep 17 00:00:00 2001
From: Steffen Weinstock <79531202+stewsk@users.noreply.github.com>
Date: Fri, 9 May 2025 14:37:28 +0200
Subject: [PATCH 1/2] (cds 9) Std DB functions by default
---
guides/databases.md | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/guides/databases.md b/guides/databases.md
index ab2325c95..75910a3ca 100644
--- a/guides/databases.md
+++ b/guides/databases.md
@@ -886,20 +886,13 @@ Instead, they protect the integrity of your data in the database layer against p
## Standard Database Functions
{ #functions-mappings-for-runtime-queries }
-A specified set of standard functions - inspired by [OData](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#sec_StringandCollectionFunctions) and [SAP HANA](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-sql-reference-guide/alphabetical-list-of-functions?locale=en-US) - is supported in a **database-agnostic**, hence portable way, and translated to the best-possible native SQL functions or polyfills.
+A specified set of standard functions - inspired by [OData](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#sec_StringandCollectionFunctions) and [SAP HANA](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-sql-reference-guide/alphabetical-list-of-functions?locale=en-US) - is supported in a **database-agnostic**, hence portable way, and translated to the best-possible native SQL functions or polyfills during runtime (currently only Node.js) and for your CDL files.
-Those functions are automatically mapped during runtime (Node.js) already today.
-To switch on the same mappings for your CDL files, you have to set:
+__TODO__ keep this?
+For compatibility reasons, you can switch back to the old behavior in the compiler via
-cds.cdsc.standardDatabaseFunctions = true
+cds.cdsc.standardDatabaseFunctions = false
-::: tip
-this will be the default starting with `@sap/cds-compiler >= 9` and hence is only needed for earlier versions.
-:::
-
-
### OData standard functions
From 50e22f96f57b1ad346fa3ff38b488c9b7800a789 Mon Sep 17 00:00:00 2001
From: Steffen Weinstock <79531202+stewsk@users.noreply.github.com>
Date: Fri, 16 May 2025 20:23:22 +0200
Subject: [PATCH 2/2] update
---
guides/databases.md | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/guides/databases.md b/guides/databases.md
index 75910a3ca..19493dba9 100644
--- a/guides/databases.md
+++ b/guides/databases.md
@@ -353,10 +353,6 @@ The database services guarantee the identical behavior of these operators:
In particular, the translation of `!=` to `IS NOT` in SQLite — or to `IS DISTINCT FROM` in standard SQL, or to an equivalent polyfill in SAP HANA — greatly improves the portability of your code.
-::: warning Runtime Only
-The operator mappings are available for runtime queries only, but not in CDS files.
-:::
-
### Session Variables {.node}
@@ -888,11 +884,6 @@ Instead, they protect the integrity of your data in the database layer against p
A specified set of standard functions - inspired by [OData](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#sec_StringandCollectionFunctions) and [SAP HANA](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-sql-reference-guide/alphabetical-list-of-functions?locale=en-US) - is supported in a **database-agnostic**, hence portable way, and translated to the best-possible native SQL functions or polyfills during runtime (currently only Node.js) and for your CDL files.
-__TODO__ keep this?
-For compatibility reasons, you can switch back to the old behavior in the compiler via
-
-cds.cdsc.standardDatabaseFunctions = false
-
### OData standard functions