Function tskit::bindings::tsk_provenance_table_add_row
source · pub unsafe extern "C" fn tsk_provenance_table_add_row(
self_: *mut tsk_provenance_table_t,
timestamp: *const c_char,
timestamp_length: tsk_size_t,
record: *const c_char,
record_length: tsk_size_t
) -> tsk_id_t
Expand description
@brief Adds a row to this provenance table.
@rst
Add a new provenance with the specified timestamp
and record
to the table.
Copies of the timestamp
and record
are immediately taken.
See the :ref:table definition <sec_provenance_table_definition>
for details of the columns in this table.
@endrst
@param self A pointer to a tsk_provenance_table_t object.
@param timestamp The timestamp to be associated with the new provenance. This
is a pointer to arbitrary memory. Can be NULL
if timestamp_length
is 0.
@param timestamp_length The size of the timestamp array in bytes.
@param record The record to be associated with the new provenance. This
is a pointer to arbitrary memory. Can be NULL
if record_length
is 0.
@param record_length The size of the record array in bytes.
@return Return the ID of the newly added provenance on success,
or a negative value on failure.