mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-03 23:11:00 +02:00
saving
This commit is contained in:
parent
e8c7a4f6e0
commit
ffd97375a8
160 changed files with 6704 additions and 1895 deletions
|
|
@ -23,14 +23,17 @@ export function registerTriplesCommands(program: Command): void {
|
|||
|
||||
try {
|
||||
const flow = socket.flow(opts.flow);
|
||||
const s: Term | undefined = cmdOpts.subject
|
||||
? { t: "i", i: cmdOpts.subject as string }
|
||||
const subject = cmdOpts.subject as string | undefined;
|
||||
const predicate = cmdOpts.predicate as string | undefined;
|
||||
const object = cmdOpts.object as string | undefined;
|
||||
const s: Term | undefined = subject !== undefined && subject.length > 0
|
||||
? { t: "i", i: subject }
|
||||
: undefined;
|
||||
const p: Term | undefined = cmdOpts.predicate
|
||||
? { t: "i", i: cmdOpts.predicate as string }
|
||||
const p: Term | undefined = predicate !== undefined && predicate.length > 0
|
||||
? { t: "i", i: predicate }
|
||||
: undefined;
|
||||
const o: Term | undefined = cmdOpts.object
|
||||
? { t: "i", i: cmdOpts.object as string }
|
||||
const o: Term | undefined = object !== undefined && object.length > 0
|
||||
? { t: "i", i: object }
|
||||
: undefined;
|
||||
|
||||
const triples = await flow.triplesQuery(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue