DeclaredType
A DeclaredType variable is a wrapper for a type and is used by the type service and creating objects.
Construction​
You declare a type using a structure containing the type definition and takes the following form:
typename = (versioned)? type (extends typename)?
(comment)?
// Property
name as type(qualifier?) (not null)? (default expression)? (bucket bucketDefinition)?
// Smart Data
name as smart (timeseries|curve) (with)? expression
// Constraint
constraint name (check|unique) (mark)? (condition (, condition)* | profile for checkname(param (,param)*))
end
Adding property definitions​
A property definition declares that this type has a specifically named property of a certain type. The type can be one of the following:
| Type | Description |
|---|---|
| name | A special type declaring that this field is the default property to be used as the name of the object |
| description | A special type declaring that this field is the default property to be used as the description of the object |
| dimension | A special type declaring that this field is to be used as a filter property when navigating objects of this type |
| string | A scalar string property |
| number | A scalar numeric property |
| date | A scalar date or timestamp property |
| boolean | A scalar boolean (true |
| list | A list of variables |
| object | A dynamic object |
| duration | A duration variable |
| geometry | A geometry variable |
| timeseries | A timeseries |
| curve | A curve |