pub struct SqliteStore { /* private fields */ }Implementations§
Source§impl SqliteStore
impl SqliteStore
Trait Implementations§
Source§impl IndexStore for SqliteStore
impl IndexStore for SqliteStore
fn insert_paper(&self, paper: &Paper) -> Result<()>
fn get_paper(&self, id: &str) -> Result<Option<Paper>>
Source§fn find_paper_by_doi(&self, doi: &str) -> Result<Option<Paper>>
fn find_paper_by_doi(&self, doi: &str) -> Result<Option<Paper>>
Look up a paper by its DOI (exact match). Used by the import pipeline
to skip records that are already in the library.
Source§fn find_paper_by_openalex_id(&self, openalex_id: &str) -> Result<Option<Paper>>
fn find_paper_by_openalex_id(&self, openalex_id: &str) -> Result<Option<Paper>>
Look up a paper by its OpenAlex work id (
W…). Used by the reference
graph to dedupe hydrated referenced papers on re-runs.Source§fn find_paper_by_pdf_path(&self, path: &str) -> Result<Option<Paper>>
fn find_paper_by_pdf_path(&self, path: &str) -> Result<Option<Paper>>
Look up a paper by its stored source PDF path. Second identity key:
the same file re-ingested must not become a second row.
Source§fn find_paper_by_title(&self, title: &str) -> Result<Option<Paper>>
fn find_paper_by_title(&self, title: &str) -> Result<Option<Paper>>
Look up a paper by title, compared in normalized form
(
crate::domain::paper::normalize_title). Last identity key, for
papers carrying neither a DOI nor a pdf_path. title must already be
normalized.Source§fn set_paper_body(&self, paper_id: &str, body: &str) -> Result<()>
fn set_paper_body(&self, paper_id: &str, body: &str) -> Result<()>
Store (or replace) the extracted full body text of a paper. Kept out of
the
Paper domain type so MCP/tool responses never carry megabytes of
body text.Source§fn get_paper_body(&self, paper_id: &str) -> Result<Option<String>>
fn get_paper_body(&self, paper_id: &str) -> Result<Option<String>>
Fetch the stored body text of a paper, if any.
Source§fn set_paper_pdf_path(&self, paper_id: &str, path: &str) -> Result<()>
fn set_paper_pdf_path(&self, paper_id: &str, path: &str) -> Result<()>
Record where the paper’s PDF lives on disk (a locally ingested file or
a downloaded arXiv PDF), so
reingest can re-extract without
redownloading.Source§fn set_paper_keywords(&self, id: &str, keywords: &str) -> Result<()>
fn set_paper_keywords(&self, id: &str, keywords: &str) -> Result<()>
Store the search-only keywords for a paper (LLM- or agent-generated).
Overwrites any previous value; the FTS update trigger reindexes the row.
Source§fn papers_missing_keywords(&self, limit: usize) -> Result<Vec<Paper>>
fn papers_missing_keywords(&self, limit: usize) -> Result<Vec<Paper>>
Papers that have no keywords yet — the enrichment work queue.
Source§fn papers_missing_keywords_by_topic(
&self,
topic_id: &str,
limit: usize,
) -> Result<Vec<Paper>>
fn papers_missing_keywords_by_topic( &self, topic_id: &str, limit: usize, ) -> Result<Vec<Paper>>
Same, scoped to one topic. The
keywords = '' filter lives in SQL so a
window full of already-enriched papers cannot hide the ones that need work.Source§fn papers_stalest(&self, limit: usize) -> Result<Vec<Paper>>
fn papers_stalest(&self, limit: usize) -> Result<Vec<Paper>>
Papers ordered oldest-update first — the re-enrichment queue, so repeated
--force runs advance through the library instead of repeating its head.Source§fn papers_by_topic_stalest(
&self,
topic_id: &str,
limit: usize,
) -> Result<Vec<Paper>>
fn papers_by_topic_stalest( &self, topic_id: &str, limit: usize, ) -> Result<Vec<Paper>>
Same, scoped to one topic.
fn update_paper_status(&self, id: &str, status: PaperStatus) -> Result<()>
fn update_reading_status(&self, id: &str, status: ReadingStatus) -> Result<()>
fn update_rating(&self, id: &str, rating: Rating) -> Result<()>
fn clear_rating(&self, id: &str) -> Result<()>
fn search_papers(&self, query: &str, limit: usize) -> Result<Vec<Paper>>
Source§fn search_body_evidence(
&self,
query: &str,
paper_id: Option<&str>,
limit: usize,
) -> Result<Vec<BodyEvidence>>
fn search_body_evidence( &self, query: &str, paper_id: Option<&str>, limit: usize, ) -> Result<Vec<BodyEvidence>>
Body-text matches for
query, each carrying the matching snippet and
where in the document it sits. Papers whose body is not stored (no PDF
ingest) cannot match. paper_id scopes the search to one paper; without
it the whole library is searched.fn list_papers(&self, limit: Option<usize>) -> Result<Vec<Paper>>
Source§fn list_papers_by_topic(
&self,
topic_id: &str,
limit: Option<usize>,
) -> Result<Vec<Paper>>
fn list_papers_by_topic( &self, topic_id: &str, limit: Option<usize>, ) -> Result<Vec<Paper>>
Papers explicitly linked to
topic_id via topic_papers, most relevant
first. Used so analysis/report builders scope LLM context to the
requested topic rather than arbitrary recent papers.fn insert_topic(&self, topic: &ResearchTopic) -> Result<()>
fn get_topic(&self, id: &str) -> Result<Option<ResearchTopic>>
fn list_topics(&self) -> Result<Vec<ResearchTopic>>
fn link_paper_to_topic( &self, paper_id: &str, topic_id: &str, relevance: f32, ) -> Result<()>
fn insert_gap(&self, gap: &KnowledgeGap) -> Result<()>
fn list_gaps(&self, topic_id: Option<&str>) -> Result<Vec<KnowledgeGap>>
fn get_research_state(&self, topic_id: &str) -> Result<Option<ResearchState>>
fn update_research_state(&self, state: &ResearchState) -> Result<()>
fn insert_report(&self, report: &ResearchReport) -> Result<()>
fn list_reports(&self, limit: Option<usize>) -> Result<Vec<ResearchReport>>
Source§fn insert_citations(&self, citations: &[Citation]) -> Result<usize>
fn insert_citations(&self, citations: &[Citation]) -> Result<usize>
Insert citation edges, skipping pairs already stored. Returns how many
were newly inserted.
Source§fn citations_for_paper(&self, paper_id: &str) -> Result<Vec<Citation>>
fn citations_for_paper(&self, paper_id: &str) -> Result<Vec<Citation>>
Reference edges originating from
paper_id, insertion order.Source§fn citations_citing_paper(&self, paper_id: &str) -> Result<Vec<Citation>>
fn citations_citing_paper(&self, paper_id: &str) -> Result<Vec<Citation>>
Citation edges pointing at
paper_id (works citing it), insertion
order.Source§fn set_citation_contexts(&self, citations: &[Citation]) -> Result<usize>
fn set_citation_contexts(&self, citations: &[Citation]) -> Result<usize>
Set the
context label on existing citation edges. Pairs with no
stored edge are ignored. Returns how many rows changed.fn rebuild_index(&self) -> Result<()>
fn init_schema(&self) -> Result<()>
Auto Trait Implementations§
impl !Freeze for SqliteStore
impl RefUnwindSafe for SqliteStore
impl Send for SqliteStore
impl Sync for SqliteStore
impl Unpin for SqliteStore
impl UnsafeUnpin for SqliteStore
impl UnwindSafe for SqliteStore
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