LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • LangGraph Checkpoint
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    LangGraph Checkpoint
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    Language
    Theme
    Pythonlanggraph.checkpoint.sqliteSqliteSaverget_delta_channel_history
    Method●Since v3.0

    get_delta_channel_history

    Fast-path override of BaseCheckpointSaver.get_delta_channel_history.

    Two-stage query:

    • Stage 1 (paged): newest-first slice of checkpoints returning (checkpoint_id, parent_checkpoint_id, type, checkpoint) per ancestor. Sqlite has no JSONB, so we ship the full serialized checkpoint blob and inspect channel_values in Python. Pages newest-first by checkpoint_id with a < cursor predicate; page size is DELTA_PAGE_SIZE. Stops paging when every channel has found its seed or the chain is exhausted.

    • Stage 2 (per-channel UNION ALL): one branch per channel reading writes filtered to that channel's specific chain_cids. No separate seed-blob fetch — sqlite stores channel_values inline in the checkpoint blob, so seeds come back from stage 1.

    Copy
    get_delta_channel_history(
      self,
      *,
      config: RunnableConfig,
      channels: Sequence[str]
    ) -> Mapping[str, DeltaChannelHistory]
    View source on GitHub