MCPcopy Create free account
hub / github.com/douglance/devsql / fetch_data

Method fetch_data

crates/ccql/src/sql/composite_storage.rs:549–568  ·  view source on GitHub ↗
(&self, table_name: &str, key: &Key)

Source from the content-addressed store, hash-verified

547 }
548
549 async fn fetch_data(&self, table_name: &str, key: &Key) -> Result<Option<DataRow>> {
550 if self.is_virtual_table(table_name) {
551 let rows = match table_name {
552 "jhistory" | "codex_history" => self.scan_jhistory()?,
553 "transcripts" => self.scan_transcripts()?,
554 "sessions" => self.scan_sessions()?,
555 "todos" => self.scan_todos()?,
556 _ => return Ok(None),
557 };
558
559 for (k, row) in rows {
560 if &k == key {
561 return Ok(Some(row));
562 }
563 }
564 Ok(None)
565 } else {
566 self.json_storage.fetch_data(table_name, key).await
567 }
568 }
569
570 async fn scan_data(&self, table_name: &str) -> Result<RowIter<'_>> {
571 if self.is_virtual_table(table_name) {

Callers

nothing calls this directly

Calls 5

is_virtual_tableMethod · 0.80
scan_jhistoryMethod · 0.80
scan_transcriptsMethod · 0.80
scan_sessionsMethod · 0.80
scan_todosMethod · 0.80

Tested by

no test coverage detected