ldkit 0.6.1 → 0.6.2

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.
@@ -48,14 +48,9 @@ class Decoder {
48
48
  decode() {
49
49
  const output = [];
50
50
  for (const [iri, properties] of this.graph) {
51
- console.warn("IRI", iri);
52
51
  if (properties.has(rdf.type)) {
53
52
  const types = properties.get(rdf.type);
54
53
  for (const type of types) {
55
- console.warn("TYPE", type.value);
56
- if (type.value === ldkit.Resource) {
57
- console.warn("FOUND", type);
58
- }
59
54
  if (type.termType === "NamedNode" && type.value === ldkit.Resource) {
60
55
  output.push(this.decodeNode(iri, this.schema));
61
56
  }
@@ -40,7 +40,7 @@ export class Resource {
40
40
  }
41
41
  async count() {
42
42
  const q = this.queryBuilder.countQuery();
43
- console.log(q);
43
+ // TODO: console.log(q);
44
44
  const bindings = await this.engine.queryBindings(q);
45
45
  return parseInt(bindings[0].get("count").value);
46
46
  }
@@ -51,7 +51,7 @@ export class Resource {
51
51
  }
52
52
  async find(where, limit) {
53
53
  const q = this.queryBuilder.getQuery(where, limit);
54
- console.log(q);
54
+ // TODO: console.log(q);
55
55
  const graph = await this.engine.queryGraph(q);
56
56
  return this.decode(graph);
57
57
  }
@@ -61,12 +61,12 @@ export class Resource {
61
61
  }
62
62
  async findByIris(iris) {
63
63
  const q = this.queryBuilder.getByIrisQuery(iris);
64
- console.log(q);
64
+ // TODO: console.log(q);
65
65
  const graph = await this.engine.queryGraph(q);
66
66
  return this.decode(graph);
67
67
  }
68
68
  updateQuery(query) {
69
- console.log(query);
69
+ // TODO: console.log(query);
70
70
  return this.engine.queryVoid(query);
71
71
  }
72
72
  insert(...entities) {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "main": "./script/mod.js",
4
4
  "types": "./types/mod.d.ts",
5
5
  "name": "ldkit",
6
- "version": "0.6.1",
6
+ "version": "0.6.2",
7
7
  "description": "LDkit, a Linked Data query toolkit for TypeScript developers",
8
8
  "homepage": "https://ldkit.io",
9
9
  "author": "Karel Klima <karelklima@gmail.com> (https://karelklima.com)",
@@ -51,14 +51,9 @@ class Decoder {
51
51
  decode() {
52
52
  const output = [];
53
53
  for (const [iri, properties] of this.graph) {
54
- console.warn("IRI", iri);
55
54
  if (properties.has(mod_js_1.rdf.type)) {
56
55
  const types = properties.get(mod_js_1.rdf.type);
57
56
  for (const type of types) {
58
- console.warn("TYPE", type.value);
59
- if (type.value === mod_js_1.ldkit.Resource) {
60
- console.warn("FOUND", type);
61
- }
62
57
  if (type.termType === "NamedNode" && type.value === mod_js_1.ldkit.Resource) {
63
58
  output.push(this.decodeNode(iri, this.schema));
64
59
  }
@@ -44,7 +44,7 @@ class Resource {
44
44
  }
45
45
  async count() {
46
46
  const q = this.queryBuilder.countQuery();
47
- console.log(q);
47
+ // TODO: console.log(q);
48
48
  const bindings = await this.engine.queryBindings(q);
49
49
  return parseInt(bindings[0].get("count").value);
50
50
  }
@@ -55,7 +55,7 @@ class Resource {
55
55
  }
56
56
  async find(where, limit) {
57
57
  const q = this.queryBuilder.getQuery(where, limit);
58
- console.log(q);
58
+ // TODO: console.log(q);
59
59
  const graph = await this.engine.queryGraph(q);
60
60
  return this.decode(graph);
61
61
  }
@@ -65,12 +65,12 @@ class Resource {
65
65
  }
66
66
  async findByIris(iris) {
67
67
  const q = this.queryBuilder.getByIrisQuery(iris);
68
- console.log(q);
68
+ // TODO: console.log(q);
69
69
  const graph = await this.engine.queryGraph(q);
70
70
  return this.decode(graph);
71
71
  }
72
72
  updateQuery(query) {
73
- console.log(query);
73
+ // TODO: console.log(query);
74
74
  return this.engine.queryVoid(query);
75
75
  }
76
76
  insert(...entities) {