Skip to main content

upsert_node_dedup

Function upsert_node_dedup 

Source
pub fn upsert_node_dedup(
    conn: &Connection,
    node: &GraphNode,
    window_hours: u64,
) -> Result<(String, bool)>
Expand description

Write with deduplication. If a node with the same title was written within window_hours, return the existing ID instead. Otherwise, insert and return the new ID.

Returns (id, was_deduplicated).