Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit dcf5ec6

Browse files
authored
Merge branch 'main' into navigation
2 parents 7013cb6 + fb41dd1 commit dcf5ec6

7 files changed

Lines changed: 33 additions & 26 deletions

File tree

.tours/db-native.tour

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"title": "Authors service"
3838
},
3939
{
40-
"file": "fiori/db/sqlite/index.cds",
40+
"file": "bookstore/db/sqlite/index.cds",
4141
"description": "#### SQLite Implementation\n\nHere's the first implementation for SQLite. It computes the two fields `age` and `lifetime` through SQLite's [strftime](https://sqlite.org/lang_datefunc.html) function.\n\nThrough the [`extend projection`](https://cap.cloud.sap/docs/cds/cdl#extend-view) clause you can add additional fields to projection entities. These are deployed as database views, which is why we can integrate the database functions in the first place.\n",
4242
"selection": {
4343
"start": {
@@ -52,8 +52,8 @@
5252
"title": "SQLite implementation"
5353
},
5454
{
55-
"file": "fiori/db/hana/index.cds",
56-
"description": "#### SAP HANA Implementation\n\nThis is the second implementation for SAP HANA. It computes the same two fields `age` and `lifetime` through the [YEARS_BETWEEN](https://help.sap.com/viewer/7c78579ce9b14a669c1f3295b0d8ca16/Cloud/en-US/7c0d2c161ea34def86de3f5eadd6a0af.html) and [YEAR](https://help.sap.com/viewer/7c78579ce9b14a669c1f3295b0d8ca16/Cloud/en-US/20f5fac6751910148dabd3c6821f907d.html) functions of SAP HANA.\n\n#### File Layout and Code Structure\n\nNote the path of the `.cds` file we are in: it's in a subfolder of `db`, so that it's _not_ automatically picked up when we start the application. The same is true for the SQLite implementation: it's in a separate `db/sqlite/` folder as well. In the next step, you'll see how these files are loaded.\n\nAlso, we choose to implement all of that as an extension of the original bookshop here in the _fiori_ package. See the first [CAP Samples] code tour for more details on the different packages of this repository.",
55+
"file": "bookstore/db/hana/index.cds",
56+
"description": "#### SAP HANA Implementation\n\nThis is the second implementation for SAP HANA. It computes the same two fields `age` and `lifetime` through the [YEARS_BETWEEN](https://help.sap.com/viewer/7c78579ce9b14a669c1f3295b0d8ca16/Cloud/en-US/7c0d2c161ea34def86de3f5eadd6a0af.html) and [YEAR](https://help.sap.com/viewer/7c78579ce9b14a669c1f3295b0d8ca16/Cloud/en-US/20f5fac6751910148dabd3c6821f907d.html) functions of SAP HANA.\n\n#### File Layout and Code Structure\n\nNote the path of the `.cds` file we are in: it's in a subfolder of `db`, so that it's _not_ automatically picked up when we start the application. The same is true for the SQLite implementation: it's in a separate `db/sqlite/` folder as well. In the next step, you'll see how these files are loaded.\n\nAlso, we choose to implement all of that as an extension of the original bookshop here in the _bookstore_ package. See the first [CAP Samples] code tour for more details on the different packages of this repository.",
5757
"selection": {
5858
"start": {
5959
"line": 7,
@@ -67,27 +67,27 @@
6767
"title": "SAP HANA implementation"
6868
},
6969
{
70-
"file": "fiori/package.json",
70+
"file": "bookstore/package.json",
7171
"description": "#### Configuration\n\nThe `cds` section in `package.json` is a place to configure which of the `db/sqlite` and `db/hana` folders are used for which database.\nWe use [Node.js profiles](https://cap.cloud.sap/docs/node.js/cds-env#profiles) to separate the configuration.\nIn the `development` profile, you can see that `db/sqlite` is set as the model, while the `db/hana` folder is configured in the `production` profile.",
72-
"line": 17,
72+
"line": 12,
7373
"title": "Configuration"
7474
},
7575
{
76-
"file": "fiori/package.json",
77-
"description": "#### Run with SQLite\n\nTo run with `development` and an in-memory SQLite database, you don't need to do anything special, because it's activated by default. Just run:\n\n>> cds watch fiori\n\nThen open [http://localhost:4004/admin/Authors](http://localhost:4004/admin/Authors) to see the two new fields.\n",
78-
"line": 28,
76+
"file": "bookstore/package.json",
77+
"description": "#### Run with SQLite\n\nTo run with `development` and an in-memory SQLite database, you don't need to do anything special, because it's activated by default. Just run:\n\n>> cds watch bookstore\n\nThen open [http://localhost:4004/admin/Authors](http://localhost:4004/admin/Authors) to see the two new fields.\n",
78+
"line": 30,
7979
"title": "Run with SQLite"
8080
},
8181
{
82-
"file": "fiori/package.json",
83-
"description": "#### Deploy the CDS Model to SAP HANA\n\nTo 'activate' SAP HANA through the `production` profile, you can use the global `--production` flag:\n\n>> cd fiori; cds deploy --to hana --production\n\n[Learn more about SAP HANA deployment](https://cap.cloud.sap/docs/guides/databases#get-hana)\n\n#### Run the Application\n\n>> cd fiori; cds watch --production\n\nThe service on [http://localhost:4004/admin/Authors](http://localhost:4004/admin/Authors) is the same as before, but this time the `Authors` entity is backed by a database view with an SAP HANA function.\n\n#### More\n\nIf you don't see data, you can add some in the next step.",
84-
"line": 31,
82+
"file": "bookstore/package.json",
83+
"description": "#### Deploy the CDS Model to SAP HANA\n\nTo 'activate' SAP HANA through the `production` profile, you can use the global `--production` flag:\n\n>> cd bookstore; cds deploy --to hana --production\n\n[Learn more about SAP HANA deployment](https://cap.cloud.sap/docs/guides/databases#get-hana)\n\n#### Run the Application\n\n>> cd bookstore; cds watch --production\n\nThe service on [http://localhost:4004/admin/Authors](http://localhost:4004/admin/Authors) is the same as before, but this time the `Authors` entity is backed by a database view with an SAP HANA function.\n\n#### More\n\nIf you don't see data, you can add some in the next step.",
84+
"line": 33,
8585
"title": "Run with SAP HANA"
8686
},
8787
{
88-
"file": "fiori/test/requests.http",
88+
"file": "bookstore/test/requests.http",
8989
"description": "### Add More Data\n\nOptionally you can add some `Authors` data by clicking on the _Send Request_ link (provided by the [REST client](https://marketplace.visualstudio.com/items?itemName=humao.rest-client) extension).",
90-
"line": 68,
90+
"line": 72,
9191
"selection": {
9292
"start": {
9393
"line": 67,

.tours/samples.tour

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
}
2020
},
2121
{
22-
"file": "hello/world.cds",
22+
"file": "hello/srv/world.cds",
2323
"description": "### Hello World!\n\nThis is a simplistic [Hello World](https://cap.cloud.sap/docs/get-started/hello-world) service using [CDS](https://cap.cloud.sap/docs/cds/) and [cds.services](https://cap.cloud.sap/docs/node.js/api#services-api).",
2424
"line": 2,
2525
"selection": {
@@ -68,7 +68,7 @@
6868
},
6969
{
7070
"file": "orders/db/schema.cds",
71-
"description": "### Compositions and Serving Documents\n\nA standalone orders management service, demonstrating:\n- Using [Compositions](https://cap.cloud.sap/docs/cds/cdl#compositions) in [Domain Models](https://cap.cloud.sap/docs/guides/domain-models), along with\n- [Serving deeply nested documents](https://cap.cloud.sap/docs/guides/generic-providers#serving-structured-data)\n",
71+
"description": "### Orders - Compositions and Serving Documents\n\nA standalone orders management service, demonstrating:\n- Using [Compositions](https://cap.cloud.sap/docs/cds/cdl#compositions) in [Domain Models](https://cap.cloud.sap/docs/guides/domain-models), along with\n- [Serving deeply nested documents](https://cap.cloud.sap/docs/guides/generic-providers#serving-structured-data)\n",
7272
"line": 1,
7373
"selection": {
7474
"start": {
@@ -84,7 +84,7 @@
8484
},
8585
{
8686
"file": "reviews/db/schema.cds",
87-
"description": "### More Modularity\n\nShows how to implement a modular service to manage product reviews, including:\n- Consuming other services synchronously and asynchronously\n- Serving requests synchronously\n- Emitting events asynchronously\n- Grow as you go, with:\n- Mocking app services\n- Running service meshes\n- Late-cut Micro Services\n- As well as managed data, input validations, and authorization\n",
87+
"description": "### Reviews - More Modularity\n\nShows how to implement a modular service to manage product reviews, including:\n- Consuming other services synchronously and asynchronously\n- Serving requests synchronously\n- Emitting events asynchronously\n- Grow as you go, with:\n- Mocking app services\n- Running service meshes\n- Late-cut Micro Services\n- As well as managed data, input validations, and authorization\n",
8888
"line": 1,
8989
"selection": {
9090
"start": {
@@ -99,8 +99,12 @@
9999
"title": "Reviews"
100100
},
101101
{
102-
"file": "fiori/app/index.cds",
103-
"description": "### Annotations for SAP Fiori Elements\n\nA [composite app, reusing and combining](https://cap.cloud.sap/docs/guides/verticalize) these packages:\n - [@capire/bookshop](bookshop)\n - [@capire/reviews](reviews)\n - [@capire/orders](orders)\n - [@capire/common](common)\n\n[Adds a SAP Fiori elements application](https://cap.cloud.sap/docs/guides/fiori/) to bookshop, thereby introducing to:\n - [OData Annotations](https://cap.cloud.sap/docs/guides/fiori#adding-odata-annotations) in `.cds` files\n - Support for [Fiori Draft](https://cap.cloud.sap/docs/guides/fiori#draft)\n - Support for [Value Helps](https://cap.cloud.sap/docs/guides/fiori#value-help)\n - Serving SAP Fiori apps locally\n\n[The Vue.js app](bookshop/app/vue) imported from bookshop is served as well.\n",
102+
"title": "Bookstore",
103+
"description": "### Bookstore - Reuse and UI\n\n- A [composite app, reusing and combining](https://cap.cloud.sap/docs/guides/reuse-and-compose) these packages:\n - [@capire/bookshop](bookshop)\n - [@capire/reviews](reviews)\n - [@capire/orders](orders)\n - [@capire/common](common)\n- [The Vue.js app](bookshop/app/vue) imported from bookshop is served as well\n- [The Vue.js app](reviews/app/vue) imported from reviews is served as well\n- [The Fiori app](orders/app) imported from orders is served as well\n- [OpenAPI export + Swagger UI](https://cap.cloud.sap/docs/advanced/openapi)"
104+
},
105+
{
106+
"file": "fiori/app/services.cds",
107+
"description": "### Annotations for SAP Fiori Elements\n\n- [Adds an SAP Fiori elements application](https://cap.cloud.sap/docs/guides/fiori/) to bookstore, thereby introducing to:\n- [OData Annotations](https://cap.cloud.sap/docs/guides/fiori#adding-odata-annotations) in `.cds` files\n- Support for [Fiori Draft](https://cap.cloud.sap/docs/guides/fiori#draft)\n- Support for [Value Helps](https://cap.cloud.sap/docs/guides/fiori#value-help)\n- Serving SAP Fiori apps locally\n",
104108
"line": 1,
105109
"selection": {
106110
"start": {
@@ -117,14 +121,13 @@
117121
{
118122
"file": "package.json",
119123
"description": "### All-in-one Monorepo\n\nEach sample sub directory essentially is a standard npm package, some with standard npm dependencies to other samples. The root folder's [package.json](package.json) has local links to the sub folders, such that an `npm install` populates a local `node_modules` folder acts like a local npm registry to the individual sample packages.\n",
120-
"line": 8,
121124
"selection": {
122125
"start": {
123126
"line": 8,
124127
"character": 1
125128
},
126129
"end": {
127-
"line": 15,
130+
"line": 16,
128131
"character": 1
129132
}
130133
},
@@ -133,4 +136,4 @@
133136
],
134137
"isPrimary": true,
135138
"description": "Overview of CAP Samples for Node.js"
136-
}
139+
}

bookstore/index.cds

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
namespace sap.capire.bookshop; //> important for reflection
2+
3+
using from '@capire/bookshop';
4+
using from './db/schema';

fiori/app/admin/fiori-service.cds

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using { AdminService } from '@capire/bookshop';
1+
using { AdminService } from '@capire/bookstore';
22
using from '../common'; // to help UI linter get the complete annotations
33

44
////////////////////////////////////////////////////////////////////////////

fiori/app/browse/fiori-service.cds

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using CatalogService from '@capire/bookshop';
1+
using CatalogService from '@capire/bookstore';
22

33
////////////////////////////////////////////////////////////////////////////
44
//

fiori/app/common.cds

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
Common Annotations shared by all apps
33
*/
44

5-
using {sap.capire.bookshop as my} from '@capire/bookshop';
6-
using {sap.common} from '@capire/common';
5+
using { sap.capire.bookshop as my } from '@capire/bookstore';
6+
using { sap.common } from '@capire/common';
77

88
////////////////////////////////////////////////////////////////////////////
99
//

samples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Each sub directory essentially is an individual npm package arranged in an [all-
6767

6868
## [@capire/fiori](fiori)
6969

70-
- [Adds an SAP Fiori elements application](https://cap.cloud.sap/docs/guides/fiori/) to bookshop, thereby introducing to:
70+
- [Adds an SAP Fiori elements application](https://cap.cloud.sap/docs/guides/fiori/) to bookstore, thereby introducing to:
7171
- [OData Annotations](https://cap.cloud.sap/docs/guides/fiori#adding-odata-annotations) in `.cds` files
7272
- Support for [Fiori Draft](https://cap.cloud.sap/docs/guides/fiori#draft)
7373
- Support for [Value Helps](https://cap.cloud.sap/docs/guides/fiori#value-help)

0 commit comments

Comments
 (0)