diff --git a/java/cds-data.md b/java/cds-data.md index efb1c7343..8b6f7538e 100644 --- a/java/cds-data.md +++ b/java/cds-data.md @@ -21,44 +21,44 @@ uacp: Used as link target from Help Portal at https://help.sap.com/products/BTP/ The [predefined CDS types](../cds/types) are mapped to Java types and as follows: -| CDS Type | Java Type | Remark | -|--------------------|------------------------|--------------------------------------------------------------------------| -| `cds.UUID` | `java.lang.String` | | -| `cds.Boolean` | `java.lang.Boolean` | | -| `cds.UInt8` | `java.lang.Short` | | -| `cds.Int16` | `java.lang.Short` | | -| `cds.Int32` | `java.lang.Integer` | | -| `cds.Integer` | `java.lang.Integer` | | -| `cds.Int64` | `java.lang.Long` | | -| `cds.Integer64` | `java.lang.Long` | | -| `cds.Decimal` | `java.math.BigDecimal` | | -| `cds.DecimalFloat` | `java.math.BigDecimal` | deprecated | -| `cds.Double` | `java.lang.Double` | | -| `cds.Date` | `java.time.LocalDate` | date without a time-zone (year-month-day) | -| `cds.Time` | `java.time.LocalTime` | time without a time-zone (hour-minute-second) | -| `cds.DateTime` | `java.time.Instant` | instant on the time-line with _sec_ precision | -| `cds.Timestamp` | `java.time.Instant` | instant on the time-line with _µs_ precision | -| `cds.String` | `java.lang.String` | | -| `cds.LargeString` | `java.lang.String` | `java.io.Reader` (1) if annotated with `@Core.MediaType` | -| `cds.Binary` | `byte[]` | | -| `cds.LargeBinary` | `byte[]` | `java.io.InputStream` (1) if annotated with `@Core.MediaType` | -| `cds.Vector` | `com.sap.cds.CdsVector`| for [vector embeddings](#vector-embeddings) | +| CDS Type | Java Type | Remark | +| ------------------ | ----------------------- | ------------------------------------------------------------------------ | +| `cds.UUID` | `java.lang.String` | | +| `cds.Boolean` | `java.lang.Boolean` | | +| `cds.UInt8` | `java.lang.Short` | | +| `cds.Int16` | `java.lang.Short` | | +| `cds.Int32` | `java.lang.Integer` | | +| `cds.Integer` | `java.lang.Integer` | | +| `cds.Int64` | `java.lang.Long` | | +| `cds.Integer64` | `java.lang.Long` | | +| `cds.Decimal` | `java.math.BigDecimal` | | +| `cds.DecimalFloat` | `java.math.BigDecimal` | deprecated | +| `cds.Double` | `java.lang.Double` | | +| `cds.Date` | `java.time.LocalDate` | date without a time-zone (year-month-day) | +| `cds.Time` | `java.time.LocalTime` | time without a time-zone (hour-minute-second) | +| `cds.DateTime` | `java.time.Instant` | instant on the time-line with _sec_ precision | +| `cds.Timestamp` | `java.time.Instant` | instant on the time-line with _µs_ precision | +| `cds.String` | `java.lang.String` | | +| `cds.LargeString` | `java.lang.String` | `java.io.Reader` (1) if annotated with `@Core.MediaType` | +| `cds.Binary` | `byte[]` | | +| `cds.LargeBinary` | `byte[]` | `java.io.InputStream` (1) if annotated with `@Core.MediaType` | +| `cds.Vector` | `com.sap.cds.CdsVector` | for [vector embeddings](#vector-embeddings) | ### SAP HANA-Specific Data Types To facilitate using legacy CDS models, the following [SAP HANA-specific data types](../advanced/hana#hana-types) are supported: -| CDS Type | Java Type | Remark | -| --- | --- | --- | -| `hana.TINYINT` | `java.lang.Short` | | -| `hana.SMALLINT` | `java.lang.Short` | | -| `hana.SMALLDECIMAL` | `java.math.BigDecimal` | | -| `hana.REAL` | `java.lang.Float` | | -| `hana.CHAR` | `java.lang.String` | | -| `hana.NCHAR` | `java.lang.String` | | -| `hana.VARCHAR` | `java.lang.String` | | -| `hana.CLOB` | `java.lang.String` | `java.io.Reader` (1) if annotated with `@Core.MediaType` | -| `hana.BINARY` | `byte[]` | | +| CDS Type | Java Type | Remark | +| ------------------- | ---------------------- | ------------------------------------------------------------------- | +| `hana.TINYINT` | `java.lang.Short` | | +| `hana.SMALLINT` | `java.lang.Short` | | +| `hana.SMALLDECIMAL` | `java.math.BigDecimal` | | +| `hana.REAL` | `java.lang.Float` | | +| `hana.CHAR` | `java.lang.String` | | +| `hana.NCHAR` | `java.lang.String` | | +| `hana.VARCHAR` | `java.lang.String` | | +| `hana.CLOB` | `java.lang.String` | `java.io.Reader` (1) if annotated with `@Core.MediaType` | +| `hana.BINARY` | `byte[]` | | > (1) Although the API to handle large objects is the same for every database, the streaming feature, however, is supported (and tested) in **SAP HANA**, **PostgreSQL**, and **H2**. See section [Database Support in Java](./cqn-services/persistence-services#database-support) for more details on database support and limitations. @@ -275,6 +275,8 @@ person.toJson(); // { "salutation" : "Mr.", name : { "first" : "Frank" } } Avoid cyclic relationships between CdsData objects when using toJson. ::: +
+ ## Vector Embeddings { #vector-embeddings }