Generated Sequence Field Functions

For every sequence<T> field, the schema compiler generates a family of C functions named classname_fieldname_operation(). These functions connect persistent sequence fields to the iterator-based C Sequence API.

Common rules

Generated operations

classname_fieldname_first()
Read the first logical element.
classname_fieldname_last()
Read the last logical element.
classname_fieldname_append()
Append non-null elements.
classname_fieldname_append_nullable()
Append elements with a null bitmap.
classname_fieldname_insert()
Insert non-null elements at a logical position.
classname_fieldname_insert_nullable()
Insert elements and their null bitmap.
classname_fieldname_delete()
Delete an inclusive logical range.
classname_fieldname_search()
Iterate values in an ordered value range.
classname_fieldname_join()
Map ordered input values to positions in this field.
classname_fieldname_count()
Return the logical element count.
classname_fieldname_map()
Select elements by arbitrary logical positions.
classname_fieldname_subseq()
Iterate an inclusive forward or reverse range.
classname_fieldname_iterator()
Iterate the complete field.
classname_fieldname_from_cursor()
Concatenate this field across objects visited by a cursor.
classname_fieldname_project()
Apply another iterator's current positional range to this field.
classname_fieldname_store()
Append the remaining elements of an iterator to this field.

Element types

The placeholder field_type used in the function pages is the generated C type for the sequence element. Fixed-width char<N> elements occupy exactly N bytes and are passed as contiguous fixed-size records; they are not required to be null-terminated strings.

See mco_seq_iterator_t for the iterator contract and Fixed-Width Character Sequences for character-specific rules.