1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! Parameter types for the `merge` verb (ADR-023).
//!
//! v0.1 scope: entity-only. Note merge is deferred.
use schemars;
use ;
/// Input for `merge` — deduplicate two entity records into one (ADR-014).
///
/// **v0.1: entity-only.** Both IDs must refer to entities (note merge is deferred).
///
/// Rewires all edges from `from_id` to `into_id`, merges properties by strategy,
/// unions tags, then hard-deletes `from_id`.
///
/// Use when you discover two records describe the same thing (deduplication).
/// Compare with `supersede` which preserves the old record as history (deferred past v0.1).
///
/// strategy options:
/// prefer_into (default): into's values win on conflict; from fills in missing keys
/// prefer_from: from's values win on conflict
/// union: deep object merge; scalar conflicts go to into
///
/// Returns a summary: kept_id, removed_id, edges_rewired, properties_merged, tags_unioned.
///
/// Warning: not atomic in v0.1 — re-run with the same args to recover from mid-way failures.