Skip to content
REL
REFERENCE
intrinsics

The Intrinsic Library (intrinsics)

Collection of intrinsic Rel definitions.

Int

Int(x)

Holds if x is a 64-bit signed integer type.

Examples:

Integrity constraint that tests whether x is an Int.

def R = 6
 
ic int_type_check(x in R) {
    Int(x)
}

Schema defined in a relation using Int:

def my_relation(x in String, y in Int) {
    x = "abc" and y = 123
}
 
def output = my_relation

UInt

UInt(x)

Holds if x is a 64-bit unsigned integer type.

Examples:

Integrity constraint that tests whether x is a 64-bit unsigned integer:

def R = uint64[2]
 
ic uint_type_check(x in R) {
    UInt(x)
}

UInt128

UInt128

128-bit unsigned integer type.

Float

Float(x)

Holds if x is a 64-bit floating point number type.

Example:

Integrity constraint that tests whether x is a 64-bit floating point number.

def R = Float[2.0]
 
ic float_type_check(x in R) {
    Float(x)
}
Was this doc helpful?