(
tx: &Transaction<'_>,
project_path: &str,
mutation_type: &str,
target_memory_id: i64,
superseded_by_id: Option<i64>,
category: Option<&str>,
new_content: Option<&str>,
)
| 3136 | } |
| 3137 | |
| 3138 | fn queue_memory_mutation( |
| 3139 | tx: &Transaction<'_>, |
| 3140 | project_path: &str, |
| 3141 | mutation_type: &str, |
| 3142 | target_memory_id: i64, |
| 3143 | superseded_by_id: Option<i64>, |
| 3144 | category: Option<&str>, |
| 3145 | new_content: Option<&str>, |
| 3146 | ) -> Result<(), rusqlite::Error> { |
| 3147 | // Store the row under the resolved identity (git:/dir:), mirroring the plugin's |
| 3148 | // queueMemoryMutation. The render-side filter queries by resolved identity, so a |
| 3149 | // raw-path row would be invisible to it. Idempotent on already-resolved paths |
| 3150 | // (every live memory row), defensive for any legacy raw path. |
| 3151 | let identity = normalize_stored_project_path(project_path); |
| 3152 | tx.execute( |
| 3153 | "INSERT INTO memory_mutation_log |
| 3154 | (project_path, mutation_type, target_memory_id, superseded_by_id, category, new_content, queued_at) |
| 3155 | VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7)", |
| 3156 | params![ |
| 3157 | identity, |
| 3158 | mutation_type, |
| 3159 | target_memory_id, |
| 3160 | superseded_by_id, |
| 3161 | category, |
| 3162 | new_content, |
| 3163 | now_millis() |
| 3164 | ], |
| 3165 | )?; |
| 3166 | Ok(()) |
| 3167 | } |
| 3168 | |
| 3169 | fn bump_project_user_profile_version(tx: &Transaction<'_>) -> Result<(), rusqlite::Error> { |
| 3170 | tx.execute( |
no test coverage detected