Skip to main content

stream_dictionary_state

Function stream_dictionary_state 

Source
pub fn stream_dictionary_state(
    paths: &RuntimePaths,
    emit: &mut dyn FnMut(&DictionaryStateRecord) -> bool,
) -> Result<()>
Expand description

Operations by (dictionary, key, value), then positions, then selections, in one read transaction with query_only (DS:93-138). emit returning false stops. A missing journal emits nothing and is not created; a corrupt one is an error and is left untouched.

Stopping is reported as INVALID_DICTIONARY_STATE, as the reference threw for a cancelled export. Text is read strictly: a row that is not UTF-8 is an invalid state rather than a lossy copy, because an import would otherwise store different bytes than were exported.