pub struct SessionSummariesStore { /* private fields */ }Implementations§
Source§impl SessionSummariesStore
impl SessionSummariesStore
pub fn new(pool: Arc<Pool<SqliteConnectionManager>>) -> Self
Sourcepub fn upsert(
&self,
session_id: &str,
summary_text: &str,
token_count: i32,
total_message_count: i32,
) -> Result<()>
pub fn upsert( &self, session_id: &str, summary_text: &str, token_count: i32, total_message_count: i32, ) -> Result<()>
Replace the session’s summary with an updated one.
Uses INSERT OR REPLACE so there is always exactly one row per session.
clear_count is incremented by fetching the current value first.
Sourcepub fn get(&self, session_id: &str) -> Result<Option<SessionSummary>>
pub fn get(&self, session_id: &str) -> Result<Option<SessionSummary>>
Retrieve the single summary for a session, if one exists.
Sourcepub fn delete_for_session(&self, session_id: &str) -> Result<usize>
pub fn delete_for_session(&self, session_id: &str) -> Result<usize>
Delete the summary for a session (used during full session cleanup).
Auto Trait Implementations§
impl Freeze for SessionSummariesStore
impl !RefUnwindSafe for SessionSummariesStore
impl Send for SessionSummariesStore
impl Sync for SessionSummariesStore
impl Unpin for SessionSummariesStore
impl UnsafeUnpin for SessionSummariesStore
impl !UnwindSafe for SessionSummariesStore
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more