pub fn upsert_relationship(
conn: &Connection,
namespace: &str,
source_id: i64,
target_id: i64,
rel: &NewRelationship,
) -> Result<i64, AppError>Expand description
Upserts a typed relationship between two entity ids.
Conflicts on (source_id, target_id, relation) refresh weight and
preserve a non-null description. Returns the rowid of the stored row.
ยงErrors
Returns Err(AppError::Database) on any rusqlite failure.