Skip to main content

UPSERT_CHECKPOINTS_SQL

Constant UPSERT_CHECKPOINTS_SQL 

Source
pub const UPSERT_CHECKPOINTS_SQL: &str = r#"
INSERT INTO checkpoints (thread_id, checkpoint_ns, checkpoint_id, parent_checkpoint_id, checkpoint, metadata)
VALUES (?1, ?2, ?3, ?4, ?5, ?6)
ON CONFLICT (thread_id, checkpoint_ns, checkpoint_id) DO UPDATE SET
    checkpoint = excluded.checkpoint,
    metadata = excluded.metadata
"#;
Expand description

Upsert a checkpoint, replacing the JSON payload and metadata if the (thread, ns, id) tuple already exists.