classname_fieldname_delete

Deletes an inclusive range of logical elements from a persistent sequence field.

Prototype

    MCO_RET classname_fieldname_delete(
        classname *handle,
        mco_seq_no_t from,
        mco_seq_no_t till);

Behavior

Positions are zero-based and both endpoints are inclusive. Elements after the deleted range shift left. Element payloads and NULL states remain aligned. Deleting every element leaves a valid empty sequence.

If till < from, the field is empty, or from is beyond the current end, the operation makes no change and returns success. If till extends past the end, all existing elements from from through the end are deleted.

Common return codes

Allocation and transaction errors can also be propagated. The operation participates in the surrounding transaction.

Example

    MCO_RET rc;

    /* Delete logical positions 10 through 14: five elements. */
    rc = Sensor_readings_delete(&sensor, 10, 14);