-
Notifications
You must be signed in to change notification settings - Fork 31
Parser xsodata
The information on how to develop the design-time data-persistence model for an XSK application using the XSODATA syntax
SAP Help
Tutorial: Use the SAP HANA OData Interface
OData Service-Definition Examples (XS Advanced)
Supportable | xsodata syntax | (XSKXsodataParser) | XSKOData2ODataXTransformer | Comments |
---|---|---|---|---|
HANA v1/v2 | odata service definition | SUPPORTED | SUPPORTED | documentation |
HANA v1/v2 | odata namespace definition | SUPPORTED | SUPPORTED | documentation |
HANA v1/v2 | odata object exposure | SUPPORTED | SUPPORTED | documentation |
HANA v1/v2 | odata property projection | SUPPORTED | SUPPORTED | documentation |
HANA v1/v2 | odata key specification | SUPPORTED | SUPPORTED using sap:filterable | documentation |
HANA v1/v2 | odata associations | SUPPORTED | SUPPORTED | documentation |
HANA v1/v2 | odata aggregations | SUPPORTED | SUPPORTED using sap:semantics="aggregate" | documentation |
HANA v1/v2 | odata parameters entitysets | SUPPORTED | No odata representation exist | documentation |
HANA v1/v2 | odata Etag support | NOT SUPPORTED | NOT SUPPORTED | documentation |
HANA v1/v2 | odata nullable properties | SUPPORTED | No odata representation exist | documentation |
HANA v1/v2 | odata configurable cash settings | SUPPORTED | No odata representation exist | documentation |
HANA v2 | OData Hints for SQL Select Statements | SUPPORTED | No odata representation exist | documentation |
HANA v2 | OData Entity Limits | SUPPORTED | NOT SUPPORTED | documentation |
HANA v1/v2 | modifications | SUPPORTED | SUPPORTED [forbidden: using sap:creatable, sap:updatable, sap:deletable], [events - no odata representation exist] | documentation |
HANA v1/v2 | validation scrips with XS JavaScript | SUPPORTED | no odata representation exist | documentation |
HANA v1/v2 | validation exit with SQL script | SUPPORTED | no odata representation exist | documentation |
Supported sap annotations
https://github.com/SAP/xsk/tree/main/modules/parsers/parser-xsodata
Uses the OData2ODataHTransformer.transform() method. The xsodata modification artifacts are converted to odata artifacts. See the table for the supportable operations.
xsodata modification artifacts | convert to odata |
---|---|
create using | on |
forbidden | forbid |
before | before |
after | after |
precommit | not supported |
postcommit | not supported |
Example of .xsodata will generated the following OData2ODataHTransformer
"sample.odata::table1"
update events (before "sample.odata::beforeMethod", precommit "sample.odata::beforeMethod")
delete events (after "sample.odata::afterMethod")
create forbidden;
| ODATAH_METHOD | ODATAH_TYPE | ODATAH_HANDLER |
|---------------|-------------|----------------------------|
| update | before | sample.odata::beforeMethod |
| delete | after | sample.odata::afterMethod |
| create | fordid | N/A |
Example of .xsodata will generated the following OData2ODataHTransformer
create using "sample.odata::createMethod"
update events (precommit "sample.odata::precommitMethod")
delete forbidden;
| ODATAH_METHOD | ODATAH_TYPE | ODATAH_HANDLER |
|---------------|-------------|----------------------------|
| create | on | sample.odata::createMethod |
| delete | fordid | N/A |
Dirigible Odata supports the following Multiplicity values:
ZERO_TO_ONE("0..1"), MANY("*"), ONE("1");
XSODATA Multiplicity '1..*' is NOT SUPPORTED