Mercurial > code > home > repos > light9
changeset 2267:7796bc3e46b1
cleanup
author | drewp@bigasterisk.com |
---|---|
date | Mon, 29 May 2023 11:50:48 -0700 |
parents | dfdc00c4c8fb |
children | 094e6b84b291 |
files | light9/web/patch.ts |
diffstat | 1 files changed, 2 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- 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<NamedNode> { const ret = new Set<NamedNode>(); 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<string> { -// throw ""; -// }