From cc3e85c0bfb74caafda2287c015908d02d91a1f3 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 29 Oct 2026 15:36:02 +0000 Subject: [PATCH] =?UTF-8?q?feat(DocumentQueries):=20Differ,=20a=20keyed=20?= =?UTF-8?q?value=20comparison=20of=20two=20row=20sets=20=E2=80=94=20(key,?= =?UTF-8?q?=20left,=20right)=20per=20key=20on=20both=20sides=20whose=20col?= =?UTF-8?q?umn=20differs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Nicolas Rouquette --- .meta.json | 4 ++-- libraries/DocumentQueries.sysml | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.meta.json b/.meta.json index 026058e..601652e 100644 --- a/.meta.json +++ b/.meta.json @@ -14,7 +14,7 @@ }, "libraries/DocumentQueries.sysml": { "algorithm": "SHA256", - "value": "7cad8b83772182db5aa917ed36c19feb2e0796ecd6cfbc3b6b1a4c33729b11a7" + "value": "c8f30ccffcc2c98609498c7cef83bbd5fdf74423230591721650bb4d1737f5b0" }, "libraries/IdentityMetadata.sysml": { "algorithm": "SHA256", @@ -69,7 +69,7 @@ "value": "9e00f049209584092dc8bcb398b736c08e6a39b1db667a8a744de3df72a543bf" } }, - "created": "2026-10-29T15:08:48Z", + "created": "2026-10-29T15:36:02Z", "index": { "AnalysisRecords": "libraries/AnalysisRecords.sysml", "DiagramLayout": "libraries/DiagramLayout.sysml", diff --git a/libraries/DocumentQueries.sysml b/libraries/DocumentQueries.sysml index bcdd3f3..16c956b 100644 --- a/libraries/DocumentQueries.sysml +++ b/libraries/DocumentQueries.sysml @@ -423,6 +423,18 @@ library package DocumentQueries { return result : Element[0..*] ordered; } + /* Differ: one row (key, column of left, column of right) per key value present + * in both left and right whose column cells differ — a keyed value comparison; + * keys on one side only are Except's. A key value carried by two rows on one + * side is a model error. */ + calc def Differ { + in left : Element[0..*] ordered; + in right : Element[0..*] ordered; + in key : String[1]; + in column : String[1]; + return result : Element[0..*] ordered; + } + /* Tree: the source rows arranged as a containment tree in pre-order, each * row nested under the nearest row containing it — its nearest owner among * the rows, or the individual whose part it is — at the depth the table