@traqula/generator-sparql-1-2 0.0.16 → 0.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/lib/index.cjs +256 -150
  2. package/lib/index.d.ts +18 -18
  3. package/package.json +8 -8
package/lib/index.cjs CHANGED
@@ -9717,6 +9717,11 @@ var LexerBuilder = class _LexerBuilder {
9717
9717
 
9718
9718
  // ../../packages/core/lib/Transformers.js
9719
9719
  var TransformerType = class {
9720
+ clone(obj) {
9721
+ const newObj = Object.create(Object.getPrototypeOf(obj));
9722
+ Object.defineProperties(newObj, Object.getOwnPropertyDescriptors(obj));
9723
+ return newObj;
9724
+ }
9720
9725
  safeObjectVisit(value, mapper) {
9721
9726
  if (value && typeof value === "object") {
9722
9727
  if (Array.isArray(value)) {
@@ -9726,104 +9731,213 @@ var TransformerType = class {
9726
9731
  }
9727
9732
  return value;
9728
9733
  }
9729
- transformNode(curObject, nodeCallBacks) {
9730
- let continueCheck;
9731
- let transformation;
9732
- const casted = curObject;
9733
- if (casted.type) {
9734
- continueCheck = nodeCallBacks[casted.type]?.continue;
9735
- transformation = nodeCallBacks[casted.type]?.transform;
9736
- }
9737
- let shouldContinue = true;
9738
- if (continueCheck) {
9739
- shouldContinue = continueCheck(curObject);
9740
- }
9741
- if (!shouldContinue) {
9742
- return curObject;
9743
- }
9744
- const copy3 = { ...curObject };
9745
- for (const [key, value] of Object.entries(copy3)) {
9746
- copy3[key] = this.safeObjectVisit(value, (obj) => this.transformNode(obj, nodeCallBacks));
9747
- }
9748
- if (transformation) {
9749
- return transformation(copy3);
9750
- }
9751
- return copy3;
9734
+ /**
9735
+ * Recursively transforms all objects that are not arrays. Mapper is called on deeper objects first.
9736
+ * @param startObject object to start iterating from
9737
+ * @param mapper mapper to transform the various objects - argument is a copy of the original
9738
+ * @param preVisitor callback that is evaluated before iterating deeper.
9739
+ * If continues is false, we do not iterate deeper, current object is still mapped. - default: true
9740
+ * If shortcut is true, we do not iterate deeper, nor do we branch out, this mapper will be the last one called.
9741
+ * - Default false
9742
+ */
9743
+ transformObject(startObject, mapper, preVisitor = () => ({})) {
9744
+ let didShortCut = false;
9745
+ const recurse = (curObject) => {
9746
+ const copy3 = this.clone(curObject);
9747
+ const context = preVisitor(copy3);
9748
+ didShortCut = context.shortcut ?? false;
9749
+ const continues = context.continue ?? true;
9750
+ if (continues && !didShortCut) {
9751
+ for (const [key, value] of Object.entries(copy3)) {
9752
+ if (didShortCut) {
9753
+ return copy3;
9754
+ }
9755
+ copy3[key] = this.safeObjectVisit(value, (obj) => recurse(obj));
9756
+ }
9757
+ }
9758
+ return mapper(copy3);
9759
+ };
9760
+ return recurse(startObject);
9752
9761
  }
9753
- visitNode(curObject, nodeCallBacks) {
9754
- let callback;
9755
- const casted = curObject;
9756
- if (casted.type) {
9757
- callback = nodeCallBacks[casted.type];
9758
- }
9759
- let shouldIterate = true;
9760
- if (callback) {
9761
- shouldIterate = callback(curObject);
9762
- }
9763
- if (shouldIterate) {
9764
- for (const value of Object.values(curObject)) {
9765
- this.safeObjectVisit(value, (obj) => this.visitNode(obj, nodeCallBacks));
9762
+ /**
9763
+ * Visitor that visits all objects. Visits deeper objects first.
9764
+ */
9765
+ visitObject(startObject, visitor, preVisitor = () => ({})) {
9766
+ let didShortCut = false;
9767
+ const recurse = (curObject) => {
9768
+ const context = preVisitor(curObject);
9769
+ didShortCut = context.shortcut ?? false;
9770
+ const continues = context.continue ?? true;
9771
+ if (continues && !didShortCut) {
9772
+ for (const value of Object.values(curObject)) {
9773
+ if (didShortCut) {
9774
+ return;
9775
+ }
9776
+ this.safeObjectVisit(value, (obj) => recurse(obj));
9777
+ }
9766
9778
  }
9767
- }
9779
+ visitor(curObject);
9780
+ };
9781
+ recurse(startObject);
9782
+ }
9783
+ transformNode(startObject, nodeCallBacks) {
9784
+ const transformWrapper = (curObject) => {
9785
+ const casted = curObject;
9786
+ if (casted.type) {
9787
+ const ogFunc = nodeCallBacks[casted.type]?.transform;
9788
+ if (ogFunc) {
9789
+ return ogFunc(casted);
9790
+ }
9791
+ }
9792
+ return curObject;
9793
+ };
9794
+ const preTransformWrapper = (curObject) => {
9795
+ const casted = curObject;
9796
+ if (casted.type) {
9797
+ const ogFunc = nodeCallBacks[casted.type]?.preVisitor;
9798
+ if (ogFunc) {
9799
+ return ogFunc(casted);
9800
+ }
9801
+ }
9802
+ return {};
9803
+ };
9804
+ return this.transformObject(startObject, transformWrapper, preTransformWrapper);
9805
+ }
9806
+ visitNode(startObject, nodeCallBacks) {
9807
+ const visitWrapper = (curObject) => {
9808
+ const casted = curObject;
9809
+ if (casted.type) {
9810
+ const ogFunc = nodeCallBacks[casted.type]?.visitor;
9811
+ if (ogFunc) {
9812
+ ogFunc(casted);
9813
+ }
9814
+ }
9815
+ };
9816
+ const preVisitWrapper = (curObject) => {
9817
+ const casted = curObject;
9818
+ if (casted.type) {
9819
+ const ogFunc = nodeCallBacks[casted.type]?.preVisitor;
9820
+ if (ogFunc) {
9821
+ return ogFunc(casted);
9822
+ }
9823
+ }
9824
+ return {};
9825
+ };
9826
+ this.visitObject(startObject, visitWrapper, preVisitWrapper);
9827
+ }
9828
+ traverseNodes(currentNode, traverse) {
9829
+ let didShortCut = false;
9830
+ const recurse = (curNode) => {
9831
+ const traverser = traverse[curNode.type];
9832
+ if (traverser) {
9833
+ const { next, shortcut } = traverser(curNode);
9834
+ didShortCut = shortcut ?? false;
9835
+ if (!didShortCut) {
9836
+ for (const node of next ?? []) {
9837
+ if (didShortCut) {
9838
+ return;
9839
+ }
9840
+ recurse(node);
9841
+ }
9842
+ }
9843
+ }
9844
+ };
9845
+ recurse(currentNode);
9768
9846
  }
9769
9847
  };
9770
9848
  var TransformerSubType = class extends TransformerType {
9771
- // Public visitObjects(curObject: object, visitor: (current: object) => void): void {
9772
- // for (const value of Object.values(curObject)) {
9773
- // this.safeObjectVisit(value, obj => this.visitObjects(obj, visitor));
9774
- // }
9775
- // }
9776
- transformNodeSpecific(curObject, nodeCallBacks, nodeSpecificCallBacks = {}) {
9777
- let continueCheck;
9778
- let transformation;
9779
- const casted = curObject;
9780
- if (casted.type && casted.subType) {
9781
- const specific = nodeSpecificCallBacks[casted.type];
9782
- if (specific) {
9783
- continueCheck = specific[casted.subType]?.continue;
9784
- transformation = specific[casted.subType]?.transform;
9785
- }
9786
- }
9787
- let shouldContinue = true;
9788
- if (continueCheck) {
9789
- shouldContinue = continueCheck(curObject);
9790
- }
9791
- if (!shouldContinue) {
9792
- return curObject;
9793
- }
9794
- const copy3 = { ...curObject };
9795
- for (const [key, value] of Object.entries(copy3)) {
9796
- copy3[key] = this.safeObjectVisit(value, (obj) => this.transformNodeSpecific(obj, nodeCallBacks, nodeSpecificCallBacks));
9797
- }
9798
- if (transformation) {
9799
- return transformation(copy3);
9800
- }
9801
- return copy3;
9849
+ transformNodeSpecific(startObject, nodeCallBacks, nodeSpecificCallBacks) {
9850
+ const transformWrapper = (curObject) => {
9851
+ let ogTransform;
9852
+ const casted = curObject;
9853
+ if (casted.type && casted.subType) {
9854
+ const specific = nodeSpecificCallBacks[casted.type];
9855
+ if (specific) {
9856
+ ogTransform = specific[casted.subType]?.transform;
9857
+ }
9858
+ if (!ogTransform) {
9859
+ ogTransform = nodeCallBacks[casted.type]?.transform;
9860
+ }
9861
+ }
9862
+ return ogTransform ? ogTransform(casted) : curObject;
9863
+ };
9864
+ const preVisitWrapper = (curObject) => {
9865
+ let ogPreVisit;
9866
+ const casted = curObject;
9867
+ if (casted.type && casted.subType) {
9868
+ const specific = nodeSpecificCallBacks[casted.type];
9869
+ if (specific) {
9870
+ ogPreVisit = specific[casted.subType]?.preVisitor;
9871
+ }
9872
+ if (!ogPreVisit) {
9873
+ ogPreVisit = nodeCallBacks[casted.type]?.preVisitor;
9874
+ }
9875
+ }
9876
+ return ogPreVisit ? ogPreVisit(casted) : curObject;
9877
+ };
9878
+ return this.transformObject(startObject, transformWrapper, preVisitWrapper);
9802
9879
  }
9803
9880
  /**
9804
9881
  * When both nodeCallBack and NodeSpecific callBack are matched, will only look at nodeSpecifCallback
9805
9882
  */
9806
- visitNodeSpecific(curObject, nodeCallBacks, nodeSpecificCallBacks = {}) {
9807
- let callback;
9808
- const casted = curObject;
9809
- if (casted.type && casted.subType) {
9810
- const specific = nodeSpecificCallBacks[casted.type];
9811
- if (specific) {
9812
- callback = specific[casted.subType];
9883
+ visitNodeSpecific(startObject, nodeCallBacks, nodeSpecificCallBacks) {
9884
+ const visitWrapper = (curObject) => {
9885
+ let ogTransform;
9886
+ const casted = curObject;
9887
+ if (casted.type && casted.subType) {
9888
+ const specific = nodeSpecificCallBacks[casted.type];
9889
+ if (specific) {
9890
+ ogTransform = specific[casted.subType]?.visitor;
9891
+ }
9892
+ if (!ogTransform) {
9893
+ ogTransform = nodeCallBacks[casted.type]?.visitor;
9894
+ }
9813
9895
  }
9814
- }
9815
- if (!callback && casted.type) {
9816
- callback = nodeCallBacks[curObject.type];
9817
- }
9818
- let shouldIterate = true;
9819
- if (callback) {
9820
- shouldIterate = callback(curObject) ?? true;
9821
- }
9822
- if (shouldIterate) {
9823
- for (const value of Object.values(curObject)) {
9824
- this.safeObjectVisit(value, (obj) => this.visitNodeSpecific(obj, nodeCallBacks, nodeSpecificCallBacks));
9896
+ if (ogTransform) {
9897
+ ogTransform(casted);
9825
9898
  }
9826
- }
9899
+ };
9900
+ const preVisitWrapper = (curObject) => {
9901
+ let ogPreVisit;
9902
+ const casted = curObject;
9903
+ if (casted.type && casted.subType) {
9904
+ const specific = nodeSpecificCallBacks[casted.type];
9905
+ if (specific) {
9906
+ ogPreVisit = specific[casted.subType]?.preVisitor;
9907
+ }
9908
+ if (!ogPreVisit) {
9909
+ ogPreVisit = nodeCallBacks[casted.type]?.preVisitor;
9910
+ }
9911
+ }
9912
+ return ogPreVisit ? ogPreVisit(casted) : curObject;
9913
+ };
9914
+ this.visitObject(startObject, visitWrapper, preVisitWrapper);
9915
+ }
9916
+ traverseSubNodes(currentNode, traverseNode, traverseSubNode) {
9917
+ let didShortCut = false;
9918
+ const recurse = (curNode) => {
9919
+ let traverser;
9920
+ const subObj = traverseSubNode[curNode.type];
9921
+ if (subObj) {
9922
+ traverser = subObj[curNode.subType];
9923
+ }
9924
+ if (!traverser) {
9925
+ traverser = traverseNode[curNode.type];
9926
+ }
9927
+ if (traverser) {
9928
+ const { next, shortcut } = traverser(curNode);
9929
+ didShortCut = shortcut ?? false;
9930
+ if (!didShortCut) {
9931
+ for (const node of next ?? []) {
9932
+ if (didShortCut) {
9933
+ return;
9934
+ }
9935
+ recurse(node);
9936
+ }
9937
+ }
9938
+ }
9939
+ };
9940
+ recurse(currentNode);
9827
9941
  }
9828
9942
  };
9829
9943
 
@@ -11319,12 +11433,12 @@ var CommonIRIs;
11319
11433
  CommonIRIs2["NIL"] = "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil";
11320
11434
  CommonIRIs2["TYPE"] = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type";
11321
11435
  })(CommonIRIs || (CommonIRIs = {}));
11322
- var TransformerSparql11 = class extends TransformerSubType {
11436
+ var AstTransformer = class extends TransformerSubType {
11323
11437
  };
11324
11438
 
11325
11439
  // ../../packages/rules-sparql-1-1/lib/validation/validators.js
11326
11440
  var F = new AstFactory();
11327
- var transformer = new TransformerSparql11();
11441
+ var transformer = new AstTransformer();
11328
11442
  function getAggregatesOfExpression(expression2) {
11329
11443
  if (F.isExpressionAggregate(expression2)) {
11330
11444
  return [expression2];
@@ -11403,77 +11517,69 @@ function queryIsGood(query2) {
11403
11517
  }
11404
11518
  }
11405
11519
  }
11520
+ function notUndefined(some2) {
11521
+ return some2 !== void 0;
11522
+ }
11406
11523
  function findPatternBoundedVars(iter, boundedVars) {
11407
- if (F.isQuery(iter) || F.isUpdate(iter)) {
11408
- if (F.isQuerySelect(iter) || F.isQueryDescribe(iter)) {
11409
- if (iter.where && iter.variables.some((x) => F.isWildcard(x))) {
11410
- findPatternBoundedVars(iter.where, boundedVars);
11411
- } else {
11412
- for (const v of iter.variables) {
11413
- findPatternBoundedVars(v, boundedVars);
11414
- }
11415
- }
11416
- if (iter.solutionModifiers.group) {
11417
- const grouping = iter.solutionModifiers.group;
11418
- for (const g of grouping.groupings) {
11419
- if ("variable" in g) {
11420
- findPatternBoundedVars(g.variable, boundedVars);
11421
- }
11422
- }
11423
- }
11424
- if (iter.values?.values && iter.values.values.length > 0) {
11425
- const values3 = iter.values.values;
11426
- for (const v of Object.keys(values3[0])) {
11524
+ transformer.traverseSubNodes(iter, {
11525
+ query: (op) => ({ next: [
11526
+ op.solutionModifiers.group
11527
+ ].filter(notUndefined) }),
11528
+ triple: (op) => ({ next: [op.subject, op.predicate, op.object] }),
11529
+ path: (op) => ({ next: op.items }),
11530
+ tripleCollection: (op) => ({ next: [op.identifier, ...op.triples] })
11531
+ }, {
11532
+ query: {
11533
+ select: (op) => ({ next: [
11534
+ ...op.variables.some((x) => F.isWildcard(x)) ? [op.where] : op.variables,
11535
+ op.solutionModifiers.group,
11536
+ op.values
11537
+ ].filter(notUndefined) }),
11538
+ describe: (op) => ({ next: [
11539
+ ...op.variables.some((x) => F.isWildcard(x)) ? [op.where] : op.variables,
11540
+ op.solutionModifiers.group,
11541
+ op.values
11542
+ ].filter(notUndefined) })
11543
+ },
11544
+ solutionModifier: {
11545
+ group: (op) => ({
11546
+ next: op.groupings.filter((g) => "variable" in g).map((x) => x.variable)
11547
+ }),
11548
+ having: (op) => ({ next: op.having }),
11549
+ order: (op) => ({ next: op.orderDefs.map((x) => x.expression) })
11550
+ },
11551
+ pattern: {
11552
+ values: (op) => {
11553
+ for (const v of Object.keys(op.values.at(0) ?? {})) {
11427
11554
  boundedVars.add(v);
11428
11555
  }
11556
+ return {};
11557
+ },
11558
+ bgp: (op) => ({ next: op.triples }),
11559
+ group: (op) => ({ next: op.patterns }),
11560
+ union: (op) => ({ next: op.patterns }),
11561
+ optional: (op) => ({ next: op.patterns }),
11562
+ service: (op) => ({ next: [op.name, ...op.patterns] }),
11563
+ bind: (op) => ({ next: [op.variable] }),
11564
+ graph: (op) => ({ next: [op.name, ...op.patterns] }),
11565
+ minus: (op) => ({ next: op.patterns.slice(0, 1) })
11566
+ },
11567
+ term: {
11568
+ variable: (op) => {
11569
+ boundedVars.add(op.value);
11570
+ return {};
11429
11571
  }
11430
11572
  }
11431
- } else if (F.isTerm(iter)) {
11432
- if (F.isTermVariable(iter)) {
11433
- boundedVars.add(iter.value);
11434
- }
11435
- } else if (F.isTriple(iter)) {
11436
- findPatternBoundedVars(iter.subject, boundedVars);
11437
- findPatternBoundedVars(iter.predicate, boundedVars);
11438
- findPatternBoundedVars(iter.object, boundedVars);
11439
- } else if (F.isPath(iter)) {
11440
- if (!F.isTerm(iter)) {
11441
- for (const item of iter.items) {
11442
- findPatternBoundedVars(item, boundedVars);
11443
- }
11444
- }
11445
- } else if (F.isTripleCollection(iter) || F.isPatternBgp(iter)) {
11446
- for (const triple of iter.triples) {
11447
- findPatternBoundedVars(triple, boundedVars);
11448
- }
11449
- } else if (F.isPatternGroup(iter) || F.isPatternUnion(iter) || F.isPatternOptional(iter) || F.isPatternService(iter)) {
11450
- for (const pattern of iter.patterns) {
11451
- findPatternBoundedVars(pattern, boundedVars);
11452
- }
11453
- if (F.isPatternService(iter)) {
11454
- findPatternBoundedVars(iter.name, boundedVars);
11455
- }
11456
- } else if (F.isPatternBind(iter)) {
11457
- findPatternBoundedVars(iter.variable, boundedVars);
11458
- } else if (F.isPatternValues(iter)) {
11459
- for (const variable of Object.keys(iter.values.at(0) ?? {})) {
11460
- boundedVars.add(variable);
11461
- }
11462
- } else if (F.isPatternGraph(iter)) {
11463
- findPatternBoundedVars(iter.name, boundedVars);
11464
- for (const pattern of iter.patterns) {
11465
- findPatternBoundedVars(pattern, boundedVars);
11466
- }
11467
- }
11573
+ });
11468
11574
  }
11469
11575
  function checkNote13(patterns) {
11470
11576
  for (const [index, pattern] of patterns.entries()) {
11471
11577
  if (F.isPatternBind(pattern) && index > 0 && F.isPatternBgp(patterns[index - 1])) {
11472
11578
  const bgp = patterns[index - 1];
11473
11579
  const variables = [];
11474
- transformer.visitNodeSpecific(bgp, {}, { term: { variable: (var_2) => {
11580
+ transformer.visitNodeSpecific(bgp, {}, { term: { variable: { visitor: (var_2) => {
11475
11581
  variables.push(var_2);
11476
- } } });
11582
+ } } } });
11477
11583
  if (variables.some((var_2) => var_2.value === pattern.variable.value)) {
11478
11584
  throw new Error(`Variable used to bind is already bound (?${pattern.variable.value})`);
11479
11585
  }
@@ -11499,12 +11605,12 @@ function updateNoReuseBlankNodeLabels(updateQuery) {
11499
11605
  const operation = update2.operation;
11500
11606
  if (operation.subType === "insertdata") {
11501
11607
  const blankNodesHere = /* @__PURE__ */ new Set();
11502
- transformer.visitNodeSpecific(operation, {}, { term: { blankNode: (blankNode2) => {
11608
+ transformer.visitNodeSpecific(operation, {}, { term: { blankNode: { visitor: (blankNode2) => {
11503
11609
  blankNodesHere.add(blankNode2.label);
11504
11610
  if (blankLabelsUsedInInsertData.has(blankNode2.label)) {
11505
11611
  throw new Error("Detected reuse blank node across different INSERT DATA clauses");
11506
11612
  }
11507
- } } });
11613
+ } } } });
11508
11614
  for (const blankNode2 of blankNodesHere) {
11509
11615
  blankLabelsUsedInInsertData.add(blankNode2);
11510
11616
  }
package/lib/index.d.ts CHANGED
@@ -1,9 +1,16 @@
1
1
  import { GeneratorBuilder } from '@traqula/core';
2
2
  import type { Patch } from '@traqula/core';
3
3
  import type * as T12 from '@traqula/rules-sparql-1-2';
4
- declare const sparql12GeneratorBuilder: GeneratorBuilder<T12.SparqlGeneratorContext, "filter" | "graphRef" | "load" | "clear" | "drop" | "create" | "add" | "move" | "copy" | "modify" | "update" | "query" | "datasetClauses" | "bind" | "solutionModifier" | "expression" | "aggregate" | "path" | "blankNode" | "selectQuery" | "selectClause" | "constructQuery" | "describeQuery" | "askQuery" | "update1" | "insertData" | "deleteData" | "deleteWhere" | "graphRefAll" | "quads" | "quadsNotTriples" | "usingClauses" | "argList" | "iriOrFunction" | "prologue" | "baseDecl" | "prefixDecl" | "varOrTerm" | "var" | "graphTerm" | "rdfLiteral" | "iri" | "iriFull" | "prefixedName" | "groupClause" | "havingClause" | "orderClause" | "limitOffsetClauses" | "triplesBlock" | "collectionPath" | "triplesNodePath" | "blankNodePropertyListPath" | "graphNodePath" | "whereClause" | "groupGraphPattern" | "generatePattern" | "graphPatternNotTriples" | "optionalGraphPattern" | "graphGraphPattern" | "serviceGraphPattern" | "inlineData" | "minusGraphPattern" | "groupOrUnionGraphPattern" | "queryOrUpdate" | "reifiedTriple" | "versionDecl" | "annotationPath" | "annotationBlockPath" | "tripleTerm", {
5
- filter: never;
4
+ declare const sparql12GeneratorBuilder: GeneratorBuilder<T12.SparqlGeneratorContext, "expression" | "aggregate" | "graphRef" | "path" | "filter" | "bind" | "query" | "solutionModifier" | "blankNode" | "load" | "clear" | "drop" | "create" | "add" | "move" | "copy" | "modify" | "update" | "datasetClauses" | "reifiedTriple" | "queryOrUpdate" | "selectQuery" | "constructQuery" | "describeQuery" | "askQuery" | "selectClause" | "update1" | "insertData" | "deleteData" | "deleteWhere" | "graphRefAll" | "quads" | "quadsNotTriples" | "usingClauses" | "argList" | "iriOrFunction" | "prologue" | "prefixDecl" | "baseDecl" | "varOrTerm" | "var" | "graphTerm" | "rdfLiteral" | "iri" | "iriFull" | "prefixedName" | "groupClause" | "havingClause" | "orderClause" | "limitOffsetClauses" | "triplesBlock" | "collectionPath" | "blankNodePropertyListPath" | "triplesNodePath" | "graphNodePath" | "whereClause" | "generatePattern" | "groupGraphPattern" | "graphPatternNotTriples" | "optionalGraphPattern" | "graphGraphPattern" | "serviceGraphPattern" | "inlineData" | "minusGraphPattern" | "groupOrUnionGraphPattern" | "tripleTerm" | "annotationBlockPath" | "annotationPath" | "versionDecl", {
5
+ expression: never;
6
+ aggregate: never;
6
7
  graphRef: never;
8
+ path: never;
9
+ filter: never;
10
+ bind: never;
11
+ query: never;
12
+ solutionModifier: never;
13
+ blankNode: never;
7
14
  load: never;
8
15
  clear: never;
9
16
  drop: never;
@@ -13,19 +20,14 @@ declare const sparql12GeneratorBuilder: GeneratorBuilder<T12.SparqlGeneratorCont
13
20
  copy: never;
14
21
  modify: never;
15
22
  update: never;
16
- query: never;
17
23
  datasetClauses: never;
18
- bind: never;
19
- solutionModifier: never;
20
- expression: never;
21
- aggregate: never;
22
- path: never;
23
- blankNode: never;
24
+ reifiedTriple: import("@traqula/core").GeneratorRule<T12.SparqlGeneratorContext, "reifiedTriple", T12.TripleCollectionReifiedTriple, []>;
25
+ queryOrUpdate: never;
24
26
  selectQuery: never;
25
- selectClause: never;
26
27
  constructQuery: never;
27
28
  describeQuery: never;
28
29
  askQuery: never;
30
+ selectClause: never;
29
31
  update1: never;
30
32
  insertData: never;
31
33
  deleteData: never;
@@ -37,8 +39,8 @@ declare const sparql12GeneratorBuilder: GeneratorBuilder<T12.SparqlGeneratorCont
37
39
  argList: never;
38
40
  iriOrFunction: never;
39
41
  prologue: import("@traqula/core").GeneratorRule<T12.SparqlGeneratorContext, "prologue", T12.ContextDefinition[], []>;
40
- baseDecl: never;
41
42
  prefixDecl: never;
43
+ baseDecl: never;
42
44
  varOrTerm: never;
43
45
  var: never;
44
46
  graphTerm: import("@traqula/core").GeneratorRule<T12.SparqlGeneratorContext, "graphTerm", T12.GraphTerm, []>;
@@ -52,12 +54,12 @@ declare const sparql12GeneratorBuilder: GeneratorBuilder<T12.SparqlGeneratorCont
52
54
  limitOffsetClauses: never;
53
55
  triplesBlock: import("@traqula/core").GeneratorRule<T12.SparqlGeneratorContext, "triplesBlock", T12.PatternBgp, []>;
54
56
  collectionPath: never;
55
- triplesNodePath: never;
56
57
  blankNodePropertyListPath: never;
58
+ triplesNodePath: never;
57
59
  graphNodePath: import("@traqula/core").GeneratorRule<T12.SparqlGeneratorContext, "graphNodePath", T12.GraphNode, []>;
58
60
  whereClause: never;
59
- groupGraphPattern: never;
60
61
  generatePattern: never;
62
+ groupGraphPattern: never;
61
63
  graphPatternNotTriples: never;
62
64
  optionalGraphPattern: never;
63
65
  graphGraphPattern: never;
@@ -65,15 +67,13 @@ declare const sparql12GeneratorBuilder: GeneratorBuilder<T12.SparqlGeneratorCont
65
67
  inlineData: never;
66
68
  minusGraphPattern: never;
67
69
  groupOrUnionGraphPattern: never;
68
- queryOrUpdate: never;
69
- reifiedTriple: import("@traqula/core").GeneratorRule<T12.SparqlGeneratorContext, "reifiedTriple", T12.TripleCollectionReifiedTriple, []>;
70
- versionDecl: import("@traqula/core").GeneratorRule<T12.SparqlGeneratorContext, "versionDecl", T12.ContextDefinitionVersion, []>;
71
- annotationPath: import("@traqula/core").GeneratorRule<T12.SparqlGeneratorContext, "annotationPath", T12.Annotation[], []>;
70
+ tripleTerm: import("@traqula/core").GeneratorRule<T12.SparqlGeneratorContext, "tripleTerm", T12.TermTriple, []>;
72
71
  annotationBlockPath: import("@traqula/core").GeneratorRule<T12.SparqlGeneratorContext, "annotationBlockPath", Patch<import("@traqula/rules-sparql-1-1").TripleCollectionBlankNodeProperties, {
73
72
  triples: T12.TripleNesting[];
74
73
  identifier: T12.TermBlank | T12.TermVariable | T12.TermIri;
75
74
  }>, []>;
76
- tripleTerm: import("@traqula/core").GeneratorRule<T12.SparqlGeneratorContext, "tripleTerm", T12.TermTriple, []>;
75
+ annotationPath: import("@traqula/core").GeneratorRule<T12.SparqlGeneratorContext, "annotationPath", T12.Annotation[], []>;
76
+ versionDecl: import("@traqula/core").GeneratorRule<T12.SparqlGeneratorContext, "versionDecl", T12.ContextDefinitionVersion, []>;
77
77
  }>;
78
78
  export type SparqlGenerator = ReturnType<typeof sparql12GeneratorBuilder.build>;
79
79
  export declare class Generator {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@traqula/generator-sparql-1-2",
3
3
  "type": "module",
4
- "version": "0.0.16",
4
+ "version": "0.0.17",
5
5
  "description": "SPARQL 1.2 generator",
6
6
  "lsd:module": true,
7
7
  "license": "MIT",
@@ -42,14 +42,14 @@
42
42
  "build:transpile": " node \"../../node_modules/esbuild/bin/esbuild\" --format=cjs --bundle --log-level=error --outfile=lib/index.cjs lib/index.ts"
43
43
  },
44
44
  "dependencies": {
45
- "@traqula/core": "^0.0.16",
46
- "@traqula/generator-sparql-1-1": "^0.0.16",
47
- "@traqula/rules-sparql-1-1": "^0.0.16",
48
- "@traqula/rules-sparql-1-2": "^0.0.16"
45
+ "@traqula/core": "^0.0.17",
46
+ "@traqula/generator-sparql-1-1": "^0.0.17",
47
+ "@traqula/rules-sparql-1-1": "^0.0.17",
48
+ "@traqula/rules-sparql-1-2": "^0.0.17"
49
49
  },
50
50
  "devDependencies": {
51
- "@traqula/parser-sparql-1-2": "^0.0.16",
52
- "@traqula/test-utils": "^0.0.16"
51
+ "@traqula/parser-sparql-1-2": "^0.0.17",
52
+ "@traqula/test-utils": "^0.0.17"
53
53
  },
54
- "gitHead": "2de4ee608a2337bed63ecc5cf336b1a57c39e45f"
54
+ "gitHead": "e4c1ef096da34d42ff86ac01d9affd428754c0b1"
55
55
  }