The caller must either index the span operations in this transaction or have proved the existing ambient index before a reference-only insertion. The ordinary public writer must never discard span operations.
(
txn: &mut WriteTxn<'_>,
view_name: &str,
change_id: NodeId,
change_hash: &Hash,
change: &Change,
options: &InsertOptions,
already_in_graph: bool,
)
| 252 | // have proved the existing ambient index before a reference-only insertion. |
| 253 | // The ordinary public writer must never discard span operations. |
| 254 | pub(crate) fn write_span_hunks_with_index( |
| 255 | txn: &mut WriteTxn<'_>, |
| 256 | view_name: &str, |
| 257 | change_id: NodeId, |
| 258 | change_hash: &Hash, |
| 259 | change: &Change, |
| 260 | options: &InsertOptions, |
| 261 | already_in_graph: bool, |
| 262 | ) -> InsertResult<InsertOutcome> { |
| 263 | if change.hashed.span.is_none() { |
| 264 | return Err(InsertError::InvalidChange { |
| 265 | message: "span change required".into(), |
| 266 | }); |
| 267 | } |
| 268 | write_change_to_graph_inner( |
| 269 | txn, |
| 270 | view_name, |
| 271 | change_id, |
| 272 | change_hash, |
| 273 | change, |
| 274 | options, |
| 275 | already_in_graph, |
| 276 | ) |
| 277 | } |
| 278 | |
| 279 | #[allow(clippy::too_many_arguments)] |
| 280 | fn write_change_to_graph_inner( |
no test coverage detected