pub struct Store {
pub conn: Arc<Mutex<Connection>>,
}Fields§
§conn: Arc<Mutex<Connection>>Implementations§
Source§impl Store
impl Store
pub fn open(path: &Path) -> Result<Self>
pub fn memory() -> Result<Self>
pub fn init_schema(&self) -> Result<()>
pub fn fetch_recent_results( &self, suite: &str, limit: u32, ) -> Result<Vec<TestResultRow>>
pub fn fetch_results_for_last_n_runs( &self, suite: &str, n: u32, ) -> Result<Vec<TestResultRow>>
pub fn get_latest_run_id(&self, suite: &str) -> Result<Option<i64>>
pub fn fetch_results_for_run(&self, run_id: i64) -> Result<Vec<TestResultRow>>
pub fn get_last_passing_by_fingerprint( &self, fingerprint: &str, ) -> Result<Option<TestResultRow>>
pub fn insert_run(&self, suite: &str) -> Result<i64>
pub fn create_run(&self, cfg: &EvalConfig) -> Result<i64>
pub fn finalize_run(&self, run_id: i64, status: &str) -> Result<()>
pub fn insert_result_embedded( &self, run_id: i64, row: &TestResultRow, attempts: &[AttemptRow], output: &LlmResponse, ) -> Result<()>
pub fn quarantine_get_reason( &self, suite: &str, test_id: &str, ) -> Result<Option<String>>
pub fn quarantine_add( &self, suite: &str, test_id: &str, reason: &str, ) -> Result<()>
pub fn quarantine_remove(&self, suite: &str, test_id: &str) -> Result<()>
pub fn cache_get(&self, key: &str) -> Result<Option<LlmResponse>>
pub fn cache_put(&self, key: &str, resp: &LlmResponse) -> Result<()>
pub fn get_embedding(&self, key: &str) -> Result<Option<(String, Vec<f32>)>>
pub fn put_embedding(&self, key: &str, model: &str, vec: &[f32]) -> Result<()>
pub fn stats_best_effort(&self) -> Result<StoreStats>
pub fn get_episode_graph( &self, run_id: i64, test_id: &str, ) -> Result<EpisodeGraph>
pub fn insert_event( &self, event: &TraceEvent, run_id: Option<i64>, test_id: Option<&str>, ) -> Result<()>
pub fn insert_batch( &self, events: &[TraceEvent], run_id: Option<i64>, test_id: Option<&str>, ) -> Result<()>
pub fn count_rows(&self, table: &str) -> Result<i64>
Source§impl Store
impl Store
pub fn get_latest_episode_graph_by_test_id( &self, test_id: &str, ) -> Result<EpisodeGraph>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Store
impl RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnwindSafe for Store
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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