Skip to main content

Primitive Encoding

The following encodings are supported from Scala values into Morphir DDL primitives:

Morphir DDLMorphir DDL TypeScala ClassScala Example
Data.Boolean(true)Concept.Booleanscala.Booleantrue
Data.Byte(0xf)Concept.Bytescala.Byte0xf
Data.Decimal(BigDecimal)Concept.Decimalscala.BigDecimalBigDecimal("123")
Data.Integer(BigInt)Concept.Integerscala.BigIntBigInt("123")
Data.Int16(123)Concept.Int16scala.Short123.toShort
Data.Int32(123)Concept.Int32scala.Int123
Data.String("value")Concept.Stringjava.lang.Stringvalue
Data.LocalDateConcept.LocalDatejava.time.LocalDateLocalDate(2023, 1, 1)