Types

The language of Orchids is statically typed.

Orchids knows about the following types.  We first find the basic types, which can notably be used in database fields, or in array indices:

 

Type Description
int signed machine integers (32/64 bit)
uint unsigned machine integers (32/64 bit)
float floating-point numbers, corresponding to C’s double
str text strings
bstr binary strings, i.e., raw data
regex compiled regular expression
ipv4 IPv4 network address
ipv6 IPv6 network address
ctime time, given as seconds since the Epoch (00:00:00 UTC, January 1, 1970)
timeval time duration, given as seconds and microseconds
snmpoid SNMP object identifier

 

We then find the structured types.

Type Description
event Orchids event, as produced by Orchids modules
db[type1,…,typen] in memory database, namely set of n-tuples of elements of type type1,…,typen respectively; each typei must be a basic type, among str, bstr, int, uint, float, ipv4, ipv6, ctime, timeval, snmpoid
db[*] database of arbitrary tuple types; that is, the type of the empty database
[...[type n-dimensional array of elements of type type (n is the number of initial square brackets); the type of indices is not checked, apart from the fact that it should be a basic type