@lde/dataset-registry-client 0.7.1 → 0.7.3
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.
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +11 -0
- package/package.json +2 -2
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAgB,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,KAAK,qBAAqB,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAgB,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,KAAK,qBAAqB,EAAwB,MAAM,OAAO,CAAC;AAGzE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,MAAM,cAAc,GAAG,qBAAqB,CAAC,OAAO,aAAa,CAAC,CAAC;AAEzE,qBAAa,MAAM;IAEf,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADN,cAAc,EAAE,GAAG,EACnB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAAgB;IAGlC,KAAK,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAC5D,KAAK,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;CAoFlE"}
|
package/dist/client.js
CHANGED
|
@@ -24,6 +24,13 @@ export class Client {
|
|
|
24
24
|
total = results.length;
|
|
25
25
|
pageSize = total;
|
|
26
26
|
}
|
|
27
|
+
else if (args.$id) {
|
|
28
|
+
// Work around LDkit bug: count() ignores $id.
|
|
29
|
+
// IRI lookups don't need pagination.
|
|
30
|
+
results = await datasets.find({ where: args });
|
|
31
|
+
total = results.length;
|
|
32
|
+
pageSize = total;
|
|
33
|
+
}
|
|
27
34
|
else {
|
|
28
35
|
// With search criteria the results are paginated.
|
|
29
36
|
total = await datasets.count({ where: args });
|
|
@@ -36,6 +43,10 @@ export class Client {
|
|
|
36
43
|
// TODO: we could add a convention here like {OFFSET} {LIMIT} in the query string.
|
|
37
44
|
items = await datasets.query(prepareQuery(args));
|
|
38
45
|
}
|
|
46
|
+
else if (results) {
|
|
47
|
+
// Pre-fetched results ($id workaround): return them directly.
|
|
48
|
+
items = results;
|
|
49
|
+
}
|
|
39
50
|
else {
|
|
40
51
|
items = await datasets.find({
|
|
41
52
|
where: args,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lde/dataset-registry-client",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "git+https://github.com/ldelements/lde.git",
|
|
6
6
|
"directory": "packages/dataset-registry-client"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"!**/*.tsbuildinfo"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@lde/dataset": "0.7.
|
|
26
|
+
"@lde/dataset": "0.7.1",
|
|
27
27
|
"@traqula/generator-sparql-1-1": "^1.0.3",
|
|
28
28
|
"@traqula/parser-sparql-1-1": "^1.0.3",
|
|
29
29
|
"@traqula/rules-sparql-1-1": "^1.0.3",
|