Showcase how to integrate DB-specific functions (#201)

Augment `AdminService.Author` by 2 fields `age` and `lifetime` whose
values are computed by SQLite and HANA-specific functions.

Don't do this in bookshop directly, to keep it simple.  Instead, use
the fiori module, which also allows to integrate the fields in the UI.

Co-authored-by: Daniel <daniel.hutzel@sap.com>
This commit is contained in:
Christian Georgi
2021-02-24 17:26:29 +01:00
committed by GitHub
parent d368eb2ff5
commit 65c8c82f74
8 changed files with 73 additions and 4 deletions

View File

@@ -8,7 +8,7 @@
"@capire/common": "*",
"@sap/cds": "^4",
"express": "^4.17.1",
"passport": "0.4.1"
"passport": "^0.4.1"
},
"scripts": {
"start": "cds run --in-memory?",
@@ -23,8 +23,14 @@
"kind": "odata", "model": "@capire/orders"
},
"db": {
"kind": "sql"
"kind": "sql",
"[development]": {
"model": "db/sqlite"
},
"[production]": {
"model": "db/hana"
}
}
}
}
}
}