MCPcopy Create free account
hub / github.com/CodeBendKit/codeseek / insert

Method insert

rust-core/src/services/embedding_service.rs:65–73  ·  view source on GitHub ↗
(&self, hash: &str, vector: &[f32])

Source from the content-addressed store, hash-verified

63 }
64
65 fn insert(&self, hash: &str, vector: &[f32]) -> Result<(), Box<dyn std::error::Error>> {
66 let conn = self.conn.lock().unwrap();
67 let blob = bincode::serialize(vector)?;
68 conn.execute(
69 "INSERT OR REPLACE INTO embedding_cache (hash, vector, created_at) VALUES (?1, ?2, strftime('%s', 'now'))",
70 params![hash, blob],
71 )?;
72 Ok(())
73 }
74}
75
76#[derive(Deserialize)]

Callers 15

mainFunction · 0.80
add_functionMethod · 0.80
parse_fileMethod · 0.80
_should_skip_fileMethod · 0.80
add_functionMethod · 0.80
add_classMethod · 0.80
add_snippetMethod · 0.80
cache_snippetMethod · 0.80
save_file_hashMethod · 0.80

Calls

no outgoing calls

Tested by 9

expand_call_chainFunction · 0.64
processMethod · 0.64
printFunction · 0.64
compare_symbolsFunction · 0.64
check_duplicatesFunction · 0.64
base_skeletonizer_testFunction · 0.64