Veil
Integer Arrays

Integer arrays are used to store simple mappings of keys to values. In the Veil demo (The Veil Demo Application) they are used to record the extra privilege required to access person_details and project_details of each detail_type: the integer array being used to map the detail_type_id to the privilege_id.

Note that integer array elements cannot be null.

The following functions comprise the Veil int arrays API:

init_int4array(arrayname text, range text)

function veil.init_int4array(arrayname text, range text) returns bool

Creates, or resets the ranges of, an int array. Implemented by C function veil_init_int4array().

clear_int4array(arrayname text)

function veil.clear_int4array(arrayname text) returns bool

Clears (zeroes) an int array. Implemented by C function veil_clear_int4array().

int4array_set(arrayname text, idx int4, value int4)

function veil.int4array_set(arrayname text, idx int4, value int4) returns int4

Set the value of an element in an int array. Implemented by C function veil_int4array_set().

int4array_get(arrayname text, idx int4)

function int4array_get(arrayname text, idx int4) returns int4

Get the value of an element from an int array. Implemented by C function veil_int4array_get().

Next: Veil Serialisation Functions