# HG changeset patch # User drewp@bigasterisk.com # Date 1685386248 25200 # Node ID 7796bc3e46b1c84d4367c9802d89455cdeac514e # Parent dfdc00c4c8fb5e2177140eeb9403205e2b9a6b8f cleanup diff -r dfdc00c4c8fb -r 7796bc3e46b1 light9/web/patch.ts --- a/light9/web/patch.ts Mon May 29 11:48:28 2023 -0700 +++ b/light9/web/patch.ts Mon May 29 11:50:48 2023 -0700 @@ -2,7 +2,6 @@ import debug from "debug"; import * as N3 from "n3"; import { NamedNode, Parser, Quad, Writer } from "n3"; -import { isEqualWith } from "lodash"; export interface QuadPattern { subject: N3.Quad_Subject | null; @@ -131,6 +130,7 @@ return this._allSubjsCache; } + allPreds(): Set { const ret = new Set(); for (let qq of [this.adds, this.dels]) { @@ -143,6 +143,7 @@ } } +// The schema of the json sent from graph server. export interface SyncgraphPatchMessage { patch: { adds: string; deletes: string }; } @@ -180,26 +181,3 @@ // todo: is it faster to run them in series? might be async.parallel([parseAdds, parseDels], (err: any) => cb(new Patch(dels, adds))); } - -// /** @deprecated replace with p=p.update(p2) */ -// export function patchUpdate(p1: Patch, p2: Patch): void { -// throw ""; -// } - -// /** @deprecated replace with p.summary() */ -// export function patchSizeSummary(patch: Patch) { -// throw ""; -// } - -// /** @deprecated moved to Patch.toJsonPatch */ -// export function toJsonPatch(jsPatch: Patch, cb: (jsonString: string) => void): void { -// throw ""; -// } -// /** @deprecated moved to Patch.containsAnyPreds */ -// export function patchContainsPreds(patch: Patch, preds: NamedNode[]): boolean { -// throw ""; -// } -// /** @deprecated moved to Patch.allSubjs */ -// export function allPatchSubjs(patch: Patch): Set { -// throw ""; -// }