key¶
A key
is very much similar to a record, but with restrictions on what field datatypes are supported.
A key
is typically used for addressing an entity
, therefore top level or nested vector types are not allowed as key
field types. key
definitions can includes
trait declarations.
Multiple assert blocks can be specified to perform validation.
key CurrencyPair includes Addressable {
First : string
Second : string
}
The fields which are part of a key contain the following restrictions:
- Following field types not allowed
double
trait
union
- Meta-types, such as
$entity
,$record
?
- Optional value- Parameterized types, such as
list
,set
,map
,try
Multiple assert blocks can be specified to perform validation.