Datatypes

  1. Primitives
  2. Cardinality

Primitives

A primitive datatype defines a set of rules and expectations for a value in a blob of data.

type Primitive
  = Curie
  | Datetime
  | Name
  ...

The table below lists the identifiers for each available primitive datatype. These identifiers are used by the schema part of the Context resource.

Identifier Name Description
boolean Boolean Either true or false
curie CURIE A Link between registers
datetime Datetime A date with flexible accuracy
name Name A restricted string suitable for identifiers or attribute names
hash Hash A hashing algorithm digest
integer Integer A base 10 number
period Period A period of time
string String A UTF-8 string
text Text A Markdown text
timestamp Timestamp A point in time in UTC.
url URL A URL

Cardinality

Cardinality describes the number of elements in an unordered set. In the Registers type system the cardinality can be either one (1) or many (n).

type Datatype
  = One Primitive
  | Many Primitive
Identifier Name Description
1 One A set of a single value
n Many A set of many values

© Crown copyright released under the Open Government Licence.