Skip to content

Commit 4c9e7bb

Browse files
committed
add patching service for apply and discard differences
1 parent ca816d2 commit 4c9e7bb

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

src/services/patching.service.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { DiffModel } from "../interfaces/diffmodel.js";
2+
3+
export function applyDifferences(leftIds: number[], rightIds: number[], diffModel: DiffModel): number {
4+
5+
for (const id of leftIds) {
6+
const elem = diffModel.differencesL[id];
7+
}
8+
9+
for (const id of rightIds) {
10+
const elem = diffModel.differencesR[id];
11+
}
12+
13+
// change status of difference
14+
// ONLY if status is unresolved else ??
15+
16+
// find possible related conflict (jsonpath) and discard status for the Gegenpart
17+
18+
return 200;
19+
}
20+
21+
export function discardDifferences(leftIds: number[], rightIds: number[], diffModel: DiffModel): number {
22+
// get differences from id array
23+
24+
// change status of difference
25+
// ONLY if status is unresolved else ??
26+
27+
return 200;
28+
}

0 commit comments

Comments
 (0)