@tblabs/storage 5.2.1 → 5.2.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/Dataset.js +4 -2
- package/OnlineStorage.js +1 -0
- package/package.json +1 -1
- package/tblabs-storage-5.2.3.tgz +0 -0
- package/tblabs-storage-5.2.1.tgz +0 -0
package/Dataset.js
CHANGED
|
@@ -68,7 +68,8 @@ export class Dataset {
|
|
|
68
68
|
// }
|
|
69
69
|
async Add(id, item) {
|
|
70
70
|
this._db.Log(`Adding "${id}" to "${this.DatasetPath}"...`);
|
|
71
|
-
const
|
|
71
|
+
const rawItem = this._converter.ToRaw(item);
|
|
72
|
+
const result = await this._db.Send(new AddCommand(this._db.DatabaseDir, this.dataset, id, rawItem));
|
|
72
73
|
if (!result.IsSuccess) {
|
|
73
74
|
throw new Error(`Could not add file: ${result.ErrorMessage}`);
|
|
74
75
|
}
|
|
@@ -77,7 +78,8 @@ export class Dataset {
|
|
|
77
78
|
;
|
|
78
79
|
async Update(id, item) {
|
|
79
80
|
this._db.Log(`Updating "${id}"...`);
|
|
80
|
-
const
|
|
81
|
+
const rawItem = this._converter.ToRaw(item);
|
|
82
|
+
const result = await this._db.Send(new UpdateCommand(this._db.DatabaseDir, this.dataset, id, rawItem));
|
|
81
83
|
if (!result.IsSuccess) {
|
|
82
84
|
throw new Error(`Could not update file: ${result.ErrorMessage}`);
|
|
83
85
|
}
|
package/OnlineStorage.js
CHANGED
package/package.json
CHANGED
|
Binary file
|
package/tblabs-storage-5.2.1.tgz
DELETED
|
Binary file
|