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