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

    Chat LangChain

    What can I help with?

    Enter to send·Shift+Enter new line

    Menu

    LangGraph Checkpoint
    LangGraph Store
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    Language
    Theme
    Pythonlanggraph.checkpoint.sqliteaio
    Module●Since v1.0

    aio

    Attributes

    attribute
    DELTA_STAGE1_SQL: str
    attribute
    T

    Functions

    function
    build_delta_channels_writes_history

    Demux stage-2 rows per channel; produce per-channel histories.

    Stage-2 rows are (checkpoint_id, channel, task_id, idx, type, value, task_path). Final write order is oldest→newest globally and writes_sort_key within a checkpoint, matching the contract on DeltaChannelHistory.writes.

    seed is omitted when the walk reached a true root with no snapshot found (channel never entered seeded); consumers treat absence as "start empty".

    function
    build_delta_stage2_sql

    Stage-2 per-channel UNION ALL fetching writes from writes.

    One branch per channel with a non-empty chain. Each branch inlines its own IN (?, ?, ...) placeholder list because sqlite has no array-bind equivalent of postgres's = ANY(%s). Caller passes parameters in matching order: [thread_id, checkpoint_ns, channel, *chain_cids] per branch.

    Returns an empty string when no channel has a chain (caller skips executing in that case). Per-channel UNION ALL avoids the over-fetch of a single channel = ANY(channels) filter when channels have different chain depths — same rationale as postgres.

    function
    step_walk_with_row

    Process one streamed stage-1 row in the merged ancestor walk.

    The cursor returns (cid, type, blob) rows in walk order starting at target. The first row is target itself and is skipped (target's own writes/seed are not part of the contract).

    For each subsequent row we deserialize the blob, append the cid to every not-yet-seeded channel's chain, and check channel_values for seeds. The deserialized checkpoint is dropped before advancing — no cross-row cache, so peak in-flight is one deserialized checkpoint.

    Returns True when the caller can stop iterating and close the cursor: every requested channel is seeded, or the chain revisited a checkpoint.

    function
    load_pending_writes

    Deserialize pending_writes_sql rows in writes_sort_key order.

    function
    pending_writes_sql
    function
    search_where

    Return WHERE clause predicates for (a)search() given metadata filter and before config.

    This method returns a tuple of a string and a tuple of values. The string is the parametered WHERE clause predicate (including the WHERE keyword): "WHERE column1 = ? AND column2 IS ?". The tuple of values contains the values for each of the corresponding parameters.

    Classes

    class
    AsyncSqliteSaver

    An asynchronous checkpoint saver that stores checkpoints in a SQLite database.

    This class provides an asynchronous interface for saving and retrieving checkpoints using a SQLite database. It's designed for use in asynchronous environments and offers better performance for I/O-bound operations compared to synchronous alternatives.

    View source on GitHub