在WebIDE裡将SAP HANA Database Explorer啟用:
打開database Explorer視圖:
添加一個資料庫:
資料庫執行個體作為HDI容器被添加:
When the database was created for you in your trial subaccount, it was created as an HANA Deployment Infrastructure (HDI) container, within the context of the hdi-shared plan for the HANA trial service in the SAP Cloud Platform’s Cloud Foundry (CF) environment.
在Database Explorer裡,輕按兩下Table,檢視資料庫表:
上圖看到的資料庫表MY_APP_PRODUCTS的結構,和CAP項目裡db module裡data-model.cds定義的結構一緻:
這裡可以給資料庫表裡添加新的記錄:
然後使用OData将剛剛插入的資料取出:
也可以使用SQL語句,批量删除表裡的資料:
要擷取更多Jerry的原創文章,請關注公衆号"汪子熙":