fix: remove saved_during_io from trait and add to BinaryMetaPlugin
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
@@ -74,7 +74,6 @@ pub trait MetaPlugin {
|
||||
value,
|
||||
};
|
||||
crate::db::store_meta(conn, meta)?;
|
||||
self.saved_during_io = true;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,6 +80,19 @@ impl MetaPlugin for BinaryMetaPlugin {
|
||||
self.conn = Some(conn as *const _ as *mut Connection);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn save_meta(&mut self, conn: &Connection, item_id: i64, value: String) -> Result<()> {
|
||||
let meta_name = self.meta_name();
|
||||
debug!("Saving metadata: item_id={}, name={}, value={}", item_id, meta_name, value);
|
||||
let meta = crate::db::Meta {
|
||||
id: item_id,
|
||||
name: meta_name,
|
||||
value,
|
||||
};
|
||||
crate::db::store_meta(conn, meta)?;
|
||||
self.saved_during_io = true;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
impl CwdMetaPlugin {
|
||||
|
||||
Reference in New Issue
Block a user