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>
11 lines
291 B
Plaintext
11 lines
291 B
Plaintext
//
|
||
// Add Author.age and .lifetime with a DB-specific function
|
||
//
|
||
|
||
using { AdminService } from '..';
|
||
|
||
extend projection AdminService.Authors with {
|
||
YEARS_BETWEEN(dateOfBirth, dateOfDeath) as age: Integer,
|
||
YEAR(dateOfBirth) || ' – ' || YEAR(dateOfDeath) as lifetime : String
|
||
}
|