Skip to main content

append_entries

Function append_entries 

Source
pub async fn append_entries(
    path: &Path,
    new_entries: &[SessionEntry],
    start_seq: usize,
    message_count: u64,
    session_name: Option<&str>,
) -> Result<()>
Expand description

Incrementally append new entries to an existing SQLite session database.

Only the entries in new_entries (starting at 1-based sequence start_seq) are inserted. The header row is left unchanged, while the message_count and name meta rows are upserted to reflect the current totals.

This avoids the DELETE+reinsert cost of save_session for the common case where a few entries are appended between saves.