Appends a contiguous array of non-null elements to a persistent sequence field.
MCO_RET classname_fieldname_append(
classname *handle,
field_type const *values,
mco_size_t n_items
);
handle is scoped to an active read-write transaction.
values points to n_items contiguous elements of
the generated field type. For char<N>, the buffer
contains n_items * N bytes.
For an ascending or descending sequence field, the input array must be
ordered in the declared direction and its first value must preserve order
relative to the current last element. Otherwise the function returns
MCO_E_SEQ_OUT_OF_ORDER.
MCO_S_OK: all requested elements were appended.MCO_E_ACCESS: the transaction is not writable.MCO_E_SEQ_OUT_OF_ORDER: an ordered field would become unordered.Allocation and transaction errors can also be propagated. The operation participates in the surrounding transaction and is undone by rollback.
mco_int4 values[3] = { 10, 20, 30 };
MCO_RET rc;
rc = Sensor_readings_append(&sensor, values, 3);
Use classname_fieldname_append_nullable() to append NULL elements.