MCPcopy Create free account
hub / github.com/PRQL/prql / insert

Method insert

prqlc/prqlc/src/lib.rs:487–491  ·  view source on GitHub ↗
(&mut self, path: PathBuf, content: String)

Source from the content-addressed store, hash-verified

485 }
486
487 pub fn insert(&mut self, path: PathBuf, content: String) {
488 let last_id = self.source_ids.keys().max().cloned().unwrap_or(0);
489 self.sources.insert(path.clone(), content);
490 self.source_ids.insert(last_id + 1, path);
491 }
492
493 pub fn get_path(&self, source_id: u16) -> Option<&PathBuf> {
494 self.source_ids.get(&source_id)

Callers 2

func_callFunction · 0.45
newMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected