pub fn insert(conn: &Connection, m: &NewMemory) -> Result<i64, AppError>Expand description
Inserts a new row into the memories table.
§Arguments
conn— active SQLite connection, typically inside a transaction.m— validated payload includingbody_hashand serialized metadata.
§Returns
The rowid assigned to the newly inserted memory.
§Errors
Returns Err(AppError::Database) on insertion failure and
Err(AppError::Json) if metadata serialization fails.