pub struct SqliteCheckpoint { /* private fields */ }Expand description
Stores latest checkpoints, transcripts, and middleware state in SQLite.
Implementations§
Trait Implementations§
Source§impl CheckpointStore for SqliteCheckpoint
impl CheckpointStore for SqliteCheckpoint
Source§fn load<'a>(
&'a self,
session_id: &'a str,
) -> BoxFuture<'a, Result<Option<Checkpoint>>>
fn load<'a>( &'a self, session_id: &'a str, ) -> BoxFuture<'a, Result<Option<Checkpoint>>>
Loads the latest checkpoint for a session.
Source§fn delete_sessions<'a>(
&'a self,
session_ids: &'a [String],
) -> BoxFuture<'a, Result<bool>>
fn delete_sessions<'a>( &'a self, session_ids: &'a [String], ) -> BoxFuture<'a, Result<bool>>
Atomically deletes the selected sessions, their descendants, and session-scoped state. Read more
Source§fn save<'a>(
&'a self,
checkpoint: &'a Checkpoint,
transcript_delta: &'a [Value],
execution: Option<&'a ExecutionRecord>,
) -> BoxFuture<'a, Result<()>>
fn save<'a>( &'a self, checkpoint: &'a Checkpoint, transcript_delta: &'a [Value], execution: Option<&'a ExecutionRecord>, ) -> BoxFuture<'a, Result<()>>
Atomically replaces the checkpoint, appends transcript items, and records a finished turn.
Source§fn save_with_events<'a>(
&'a self,
checkpoint: Checkpoint,
transcript_delta: Vec<Value>,
execution: Option<ExecutionRecord>,
events: Vec<TimestampedEvent>,
) -> BoxFuture<'a, Result<Vec<JournalEvent>>>
fn save_with_events<'a>( &'a self, checkpoint: Checkpoint, transcript_delta: Vec<Value>, execution: Option<ExecutionRecord>, events: Vec<TimestampedEvent>, ) -> BoxFuture<'a, Result<Vec<JournalEvent>>>
Atomically saves one owned checkpoint and appends its normalized event batch. Read more
Source§fn append_event<'a>(
&'a self,
session_id: &'a str,
recorded_at_ms: i64,
event: &'a Event,
) -> BoxFuture<'a, Result<JournalEvent>>
fn append_event<'a>( &'a self, session_id: &'a str, recorded_at_ms: i64, event: &'a Event, ) -> BoxFuture<'a, Result<JournalEvent>>
Assigns a session-local sequence and appends one normalized event atomically.
Source§fn event_page<'a>(
&'a self,
session_id: &'a str,
request: EventPageRequest,
) -> BoxFuture<'a, Result<EventPage>>
fn event_page<'a>( &'a self, session_id: &'a str, request: EventPageRequest, ) -> BoxFuture<'a, Result<EventPage>>
Loads one newest-first page of normalized session events.
Source§fn session_summary<'a>(
&'a self,
session_id: &'a str,
) -> BoxFuture<'a, Result<Option<SessionSummary>>>
fn session_summary<'a>( &'a self, session_id: &'a str, ) -> BoxFuture<'a, Result<Option<SessionSummary>>>
Loads catalog metadata for one session without reading its checkpoint context.
Source§fn list_sessions_page(
&self,
request: SessionPageRequest,
) -> BoxFuture<'_, Result<SessionPage>>
fn list_sessions_page( &self, request: SessionPageRequest, ) -> BoxFuture<'_, Result<SessionPage>>
Lists one page of the most recently updated sessions, newest first.
Source§fn transcript_page<'a>(
&'a self,
session_id: &'a str,
request: TranscriptPageRequest,
) -> BoxFuture<'a, Result<TranscriptPage>>
fn transcript_page<'a>( &'a self, session_id: &'a str, request: TranscriptPageRequest, ) -> BoxFuture<'a, Result<TranscriptPage>>
Loads one newest-first page of append-only transcript deltas.
Source§fn execution_page<'a>(
&'a self,
session_id: &'a str,
request: ExecutionPageRequest,
) -> BoxFuture<'a, Result<ExecutionPage>>
fn execution_page<'a>( &'a self, session_id: &'a str, request: ExecutionPageRequest, ) -> BoxFuture<'a, Result<ExecutionPage>>
Loads one newest-first page of terminal user-turn records.
Source§fn recent_executions(
&self,
limit: usize,
) -> BoxFuture<'_, Result<Vec<ExecutionRecord>>>
fn recent_executions( &self, limit: usize, ) -> BoxFuture<'_, Result<Vec<ExecutionRecord>>>
Loads the most recently started terminal user turns across all sessions.
Source§fn fork<'a>(
&'a self,
parent_session_id: &'a str,
parent_sequence: u64,
checkpoint: &'a Checkpoint,
) -> BoxFuture<'a, Result<SessionSummary>>
fn fork<'a>( &'a self, parent_session_id: &'a str, parent_sequence: u64, checkpoint: &'a Checkpoint, ) -> BoxFuture<'a, Result<SessionSummary>>
Creates a child session at an exact durable parent sequence.
Auto Trait Implementations§
impl Freeze for SqliteCheckpoint
impl RefUnwindSafe for SqliteCheckpoint
impl Send for SqliteCheckpoint
impl Sync for SqliteCheckpoint
impl Unpin for SqliteCheckpoint
impl UnsafeUnpin for SqliteCheckpoint
impl UnwindSafe for SqliteCheckpoint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more