Types

Adama has many built-in primal types! The following tables outline which types are available.

typecontentsdefaultfun example
boolbool can have one of the two values true or false.falsetrue
intint is a signed integer number that uses 32-bits. This results in valid values between −2,147,483,648 and 2,147,483,647.042
longlong is a signed integer number that uses 64-bits. This results in valid values between -9,223,372,036,854,775,808 and +9,223,372,036,854,775,807.042
doubledouble is a floating-point type which uses 64-bit IEEE754. This results in a range of 1.7E +/- 308 (15 digits).0.03.15
complexcomplex is a tuple of two doubles under the complex field of numbers0 + 0 * @i@i
stringstring is a utf-8 encoded collection of code-points."" (empty string)"Hello World"
labellabel is a pointer to a block of code which is used by the state machine,# (the no-state)#hello
principalprincipal is a reference to a connected person, and the backing data establishes who they are. This is used for acquiring data and decisions from people,@no_one@no_one
dynamica blob of JSON@null@null

Call-out to other types

The above built-in types are building blocks for richer types, and the below table provides callouts to other type mechanisms. Not all types are valid at the document level.

TypeQuick call outApplicable to document/record
assetsAn asset is an externally stored byte blobyes
enumAn enumeration is a type that consists of a finite set of named constants.yes
messagesA message is a collection of variables grouped under one name used for communication via channels.only via a formula
recordsA record is a collection of variables grouped under one name used for persistence.yes
maybeSometimes things didn't or can't happen, and we use maybe to express that absence rather than null. Monads for the win!yes (only for applicable types)
tableA table forms the ultimate collection enabling maps, lists, sets, and more. Tables use records to persist information in a structured way.yes
channelChannels enable communication between the document and people via handlers and futures.only root document
futureA future is a result that will arrive in the future.no
mapsA map enables associating keys to values, but they can also be the result of a reduction.yes
listsA list is created by using language integrated query on a tableyes
arraysAn array is a read-only finite collection of a adjacent itemsonly via a formula
resultA result is the ongoing progress of a service call made to a remote serviceonly via a formula
serviceA service is a way to reach beyond the document to a remote resourcesonly root document