diff --git a/light9/web/patch.ts b/light9/web/patch.ts --- a/light9/web/patch.ts +++ b/light9/web/patch.ts @@ -2,7 +2,6 @@ import * as async from "async"; 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 @@ export class Patch { return this._allSubjsCache; } + allPreds(): Set { const ret = new Set(); for (let qq of [this.adds, this.dels]) { @@ -143,6 +143,7 @@ export class Patch { } } +// The schema of the json sent from graph server. export interface SyncgraphPatchMessage { patch: { adds: string; deletes: string }; } @@ -180,26 +181,3 @@ export function parseJsonPatch(input: Sy // 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 ""; -// }