pub struct ChunkRepository<'a> { /* private fields */ }Implementations§
Source§impl<'a> ChunkRepository<'a>
impl<'a> ChunkRepository<'a>
pub fn new(catalog: &'a Catalog) -> Self
Sourcepub fn insert_bundle(
&self,
file_id: &FileId,
extraction_id: &ExtractionId,
specs: &[ChunkSpec],
) -> OrbokResult<Vec<ChunkRecord>>
pub fn insert_bundle( &self, file_id: &FileId, extraction_id: &ExtractionId, specs: &[ChunkSpec], ) -> OrbokResult<Vec<ChunkRecord>>
Replace-on-success bundle insert (RFC-006 §12):
- Insert new chunks + locations as active.
- Insert FTS rows and keyword_index_records.
- Mark old chunks (same file, different extraction) stale.
- Mark the file as indexed.
All steps are inside one transaction. A failure leaves the previous active chunks untouched.
Sourcepub fn list_for_file(&self, file_id: &FileId) -> OrbokResult<Vec<ChunkRecord>>
pub fn list_for_file(&self, file_id: &FileId) -> OrbokResult<Vec<ChunkRecord>>
Retrieve chunk records for a file (used by snippet loader and tests).
Auto Trait Implementations§
impl<'a> Freeze for ChunkRepository<'a>
impl<'a> RefUnwindSafe for ChunkRepository<'a>
impl<'a> Send for ChunkRepository<'a>
impl<'a> Sync for ChunkRepository<'a>
impl<'a> Unpin for ChunkRepository<'a>
impl<'a> UnsafeUnpin for ChunkRepository<'a>
impl<'a> UnwindSafe for ChunkRepository<'a>
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