ldkit 2.5.1 → 2.5.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.
- package/esm/library/lens/update_helper.d.ts.map +1 -1
- package/esm/library/lens/update_helper.js +10 -5
- package/esm/library/options.d.ts +2 -1
- package/esm/library/options.d.ts.map +1 -1
- package/package.json +1 -1
- package/script/library/lens/update_helper.d.ts.map +1 -1
- package/script/library/lens/update_helper.js +10 -5
- package/script/library/options.d.ts +2 -1
- package/script/library/options.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update_helper.d.ts","sourceRoot":"","sources":["../../../src/library/lens/update_helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiB;IACxC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmC;IAC9D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;IAElC,OAAO,CAAC,eAAe,CAAK;IAE5B,SAAgB,WAAW,EAAE,GAAG,CAAC,IAAI,EAAE,CAAM;IAC7C,SAAgB,WAAW,EAAE,GAAG,CAAC,IAAI,EAAE,CAAM;IAC7C,SAAgB,UAAU,EAAE,WAAW,EAAE,CAAM;gBAG7C,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,OAAO,EAChB,mBAAmB,SAAI;IAQlB,OAAO,CAAC,MAAM,EAAE,MAAM;IAM7B,OAAO,CAAC,eAAe;IAoBvB,OAAO,CAAC,qBAAqB;IAgC7B,OAAO,CAAC,oBAAoB;
|
|
1
|
+
{"version":3,"file":"update_helper.d.ts","sourceRoot":"","sources":["../../../src/library/lens/update_helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiB;IACxC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmC;IAC9D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;IAElC,OAAO,CAAC,eAAe,CAAK;IAE5B,SAAgB,WAAW,EAAE,GAAG,CAAC,IAAI,EAAE,CAAM;IAC7C,SAAgB,WAAW,EAAE,GAAG,CAAC,IAAI,EAAE,CAAM;IAC7C,SAAgB,UAAU,EAAE,WAAW,EAAE,CAAM;gBAG7C,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,OAAO,EAChB,mBAAmB,SAAI;IAQlB,OAAO,CAAC,MAAM,EAAE,MAAM;IAM7B,OAAO,CAAC,eAAe;IAoBvB,OAAO,CAAC,qBAAqB;IAgC7B,OAAO,CAAC,oBAAoB;IAmB5B,OAAO,CAAC,eAAe;IA0BvB,OAAO,CAAC,qBAAqB;IAyB7B,OAAO,CAAC,sBAAsB;IA8B9B,OAAO,CAAC,MAAM;CASf"}
|
|
@@ -62,7 +62,7 @@ export class UpdateHelper {
|
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
64
|
if (property["@array"]) {
|
|
65
|
-
this.processArrayProperty(entity, propertyName, value);
|
|
65
|
+
this.processArrayProperty(entity, propertyName, value, property);
|
|
66
66
|
}
|
|
67
67
|
else {
|
|
68
68
|
this.processSingleProperty(entity, propertyName, value, property);
|
|
@@ -92,23 +92,28 @@ export class UpdateHelper {
|
|
|
92
92
|
const quadsToInsert = this.encode(insertPattern);
|
|
93
93
|
this.insertQuads.push(...quadsToInsert);
|
|
94
94
|
}
|
|
95
|
-
processArrayProperty(entity, propertyName, propertyValue) {
|
|
95
|
+
processArrayProperty(entity, propertyName, propertyValue, property) {
|
|
96
96
|
const config = this.parseArrayUpdateConfig(propertyValue);
|
|
97
97
|
if (config.$set) {
|
|
98
|
-
this.processArraySet(entity, propertyName, config.$set);
|
|
98
|
+
this.processArraySet(entity, propertyName, config.$set, property);
|
|
99
99
|
}
|
|
100
100
|
else {
|
|
101
101
|
this.processArrayAddRemove(entity, propertyName, config.$add, config.$remove);
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
processArraySet(entity, propertyName, propertyValue) {
|
|
104
|
+
processArraySet(entity, propertyName, propertyValue, property) {
|
|
105
105
|
const deletePattern = {
|
|
106
106
|
$id: entity.$id,
|
|
107
107
|
[propertyName]: null,
|
|
108
108
|
};
|
|
109
109
|
const quadsToDelete = this.encode(deletePattern);
|
|
110
110
|
this.deleteQuads.push(...quadsToDelete);
|
|
111
|
-
|
|
111
|
+
if (property["@optional"]) {
|
|
112
|
+
this.whereQuads.push(OPTIONAL `${quadsToDelete}`);
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
this.whereQuads.push(...quadsToDelete);
|
|
116
|
+
}
|
|
112
117
|
const insertPattern = {
|
|
113
118
|
$id: entity.$id,
|
|
114
119
|
[propertyName]: propertyValue,
|
package/esm/library/options.d.ts
CHANGED
|
@@ -45,9 +45,10 @@ export declare function resolveOptions(options?: Options): {
|
|
|
45
45
|
queryFormat?: import("@rdfjs/types").QueryFormat;
|
|
46
46
|
baseIRI?: string;
|
|
47
47
|
queryTimestamp?: Date;
|
|
48
|
-
sources?: [import("@comunica/types").QuerySourceUnidentified, ...import("@comunica/types").QuerySourceUnidentified[]] | undefined;
|
|
48
|
+
sources?: ([import("@comunica/types").QuerySourceUnidentified, ...import("@comunica/types").QuerySourceUnidentified[]] & import("@comunica/types").QuerySourceUnidentified[]) | undefined;
|
|
49
49
|
destination?: import("@comunica/types").IDataDestination;
|
|
50
50
|
initialBindings?: import("@rdfjs/types").Bindings;
|
|
51
|
+
fileBaseIRI?: string;
|
|
51
52
|
log?: import("@comunica/types").Logger;
|
|
52
53
|
datetime?: Date;
|
|
53
54
|
httpProxyHandler?: import("@comunica/types").IProxyHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/library/options.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,YAAY,EAElB,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;GAQG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AAU1B;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAEvD;AAED,wBAAgB,cAAc,CAAC,OAAO,GAAE,OAAY;YAxCzC,YAAY;eACV,MAAM;UACV,MAAM;cACF,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/library/options.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,YAAY,EAElB,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;GAQG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,CAAC,EAAE,YAAY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AAM;CASf"}
|
|
@@ -65,7 +65,7 @@ class UpdateHelper {
|
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
67
|
if (property["@array"]) {
|
|
68
|
-
this.processArrayProperty(entity, propertyName, value);
|
|
68
|
+
this.processArrayProperty(entity, propertyName, value, property);
|
|
69
69
|
}
|
|
70
70
|
else {
|
|
71
71
|
this.processSingleProperty(entity, propertyName, value, property);
|
|
@@ -95,23 +95,28 @@ class UpdateHelper {
|
|
|
95
95
|
const quadsToInsert = this.encode(insertPattern);
|
|
96
96
|
this.insertQuads.push(...quadsToInsert);
|
|
97
97
|
}
|
|
98
|
-
processArrayProperty(entity, propertyName, propertyValue) {
|
|
98
|
+
processArrayProperty(entity, propertyName, propertyValue, property) {
|
|
99
99
|
const config = this.parseArrayUpdateConfig(propertyValue);
|
|
100
100
|
if (config.$set) {
|
|
101
|
-
this.processArraySet(entity, propertyName, config.$set);
|
|
101
|
+
this.processArraySet(entity, propertyName, config.$set, property);
|
|
102
102
|
}
|
|
103
103
|
else {
|
|
104
104
|
this.processArrayAddRemove(entity, propertyName, config.$add, config.$remove);
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
processArraySet(entity, propertyName, propertyValue) {
|
|
107
|
+
processArraySet(entity, propertyName, propertyValue, property) {
|
|
108
108
|
const deletePattern = {
|
|
109
109
|
$id: entity.$id,
|
|
110
110
|
[propertyName]: null,
|
|
111
111
|
};
|
|
112
112
|
const quadsToDelete = this.encode(deletePattern);
|
|
113
113
|
this.deleteQuads.push(...quadsToDelete);
|
|
114
|
-
|
|
114
|
+
if (property["@optional"]) {
|
|
115
|
+
this.whereQuads.push((0, mod_js_1.OPTIONAL) `${quadsToDelete}`);
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
this.whereQuads.push(...quadsToDelete);
|
|
119
|
+
}
|
|
115
120
|
const insertPattern = {
|
|
116
121
|
$id: entity.$id,
|
|
117
122
|
[propertyName]: propertyValue,
|
|
@@ -45,9 +45,10 @@ export declare function resolveOptions(options?: Options): {
|
|
|
45
45
|
queryFormat?: import("@rdfjs/types").QueryFormat;
|
|
46
46
|
baseIRI?: string;
|
|
47
47
|
queryTimestamp?: Date;
|
|
48
|
-
sources?: [import("@comunica/types").QuerySourceUnidentified, ...import("@comunica/types").QuerySourceUnidentified[]] | undefined;
|
|
48
|
+
sources?: ([import("@comunica/types").QuerySourceUnidentified, ...import("@comunica/types").QuerySourceUnidentified[]] & import("@comunica/types").QuerySourceUnidentified[]) | undefined;
|
|
49
49
|
destination?: import("@comunica/types").IDataDestination;
|
|
50
50
|
initialBindings?: import("@rdfjs/types").Bindings;
|
|
51
|
+
fileBaseIRI?: string;
|
|
51
52
|
log?: import("@comunica/types").Logger;
|
|
52
53
|
datetime?: Date;
|
|
53
54
|
httpProxyHandler?: import("@comunica/types").IProxyHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/library/options.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,YAAY,EAElB,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;GAQG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AAU1B;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAEvD;AAED,wBAAgB,cAAc,CAAC,OAAO,GAAE,OAAY;YAxCzC,YAAY;eACV,MAAM;UACV,MAAM;cACF,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":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