Skip to main content

insert_document_map_statement

Function insert_document_map_statement 

Source
pub fn insert_document_map_statement(
    table: &str,
    namespace: &str,
    subject_id: Uuid,
) -> SqlStatement
Expand description

Upsert (namespace, subject_id)’s rowid_map_table row to point at the rowid the connection’s most recent successful INSERT produced.

Must run immediately after the FTS INSERT it tracks, on the same connection, with nothing else written in between: last_insert_rowid() is connection-scoped and reports whichever INSERT ran last. INSERT OR REPLACE means this is safe to call whether or not a map row for this key already exists (the ordinary upsert case does: the old row is overwritten with the new rowid rather than requiring a prior delete).