Skip to content
Ayhan Rashidov edited this page Sep 5, 2022 · 1 revision

CDS (.hdbdd)

This object represents a core data service.

Reference

The information on how to develop the design-time data-persistence hdbdd model for a Kronos application.

SAP Help

https://help.sap.com/docs/SAP_HANA_PLATFORM/09b6623836854766b682356393c6c416/0b1eb07d74ec4f91947ff4cc4f557429.html

Example Artifact Syntax

namespace products.db;

@Schema: 'DBADMIN'

context Products {

 entity  Orders{
        key Id               : String(32);
        CustomerName         : String(500);
        CustomerSurname      : String(500);
        Status               : String(100);
        CreatedAt            : UTCTimestamp;
        CreatedBy            : String(5000);
        Description          : String(100);
        Address              : String(5000);
        Phone                : String(200);
        Email                : String(300);
        Country              : association to Products.Country { Id };
	items                : Association[*] to Item on items.OrderId = Id;
    };
     
    entity Item {
        key ItemId          : String(32);
    	OrderId             : String(32);
	Name                : String(500);
        Type                : String(100);
        Price               : String(100);
        Currency            : String(100);
        Quantity            : String(100);
        Comment             : String(1000);
    };
    
     entity Country {
        key Id              : String(32);
        Name                : String(32);
    };

};

Sample

https://github.com/codbex/codbex-kronos/tree/main/samples/hdb-hdbdd-simple

Modules

  • ANTLR Parser

https://github.com/codbex/codbex-kronos/tree/main/modules/parsers/parser-hdbdd/src/main

  • Data Structure Parser

https://github.com/codbex/codbex-kronos/tree/main/modules/engines/engine-hdb/src/main/java/com/codbex/kronos/hdb/ds/parser/hdbdd

  • Transformer

https://github.com/codbex/codbex-kronos/tree/main/modules/engines/engine-hdb/src/main/java/com/codbex/kronos/hdb/ds/transformer/hdbdd

  • Processor

https://github.com/codbex/codbex-kronos/tree/main/modules/engines/engine-hdb/src/main/java/com/codbex/kronos/hdb/ds/processors/table https://github.com/codbex/codbex-kronos/tree/main/modules/engines/engine-hdb/src/main/java/com/codbex/kronos/hdb/ds/processors/tabletype https://github.com/codbex/codbex-kronos/tree/main/modules/engines/engine-hdb/src/main/java/com/codbex/kronos/hdb/ds/processors/view

Unit Tests

https://github.com/codbex/codbex-kronos/tree/main/modules/parsers/parser-hdbdd/src/test https://github.com/codbex/codbex-kronos/tree/main/modules/engines/engine-hdb/src/test/java/com/codbex/kronos/hdb/ds/parser/hdbdd https://github.com/codbex/codbex-kronos/tree/main/modules/engines/engine-hdb/src/test/java/com/codbex/kronos/hdb/ds/processors/table https://github.com/codbex/codbex-kronos/tree/main/modules/engines/engine-hdb/src/test/java/com/codbex/kronos/hdb/ds/processors/tabletype https://github.com/codbex/codbex-kronos/tree/main/modules/engines/engine-hdb/src/test/java/com/codbex/kronos/hdb/ds/processors/view

Integration Tests

https://github.com/codbex/codbex-kronos/tree/main/integration-tests/engine-hdb/src/test/java/com/codbex/kronos/integration/tests/hdb/ds/itest/hdbdd

Clone this wiki locally