zotero-bridge 1.1.2 → 1.1.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/README-en.md +426 -324
- package/README.md +424 -323
- package/dist/database.js +4 -4
- package/package.json +1 -1
- package/src/database.ts +4 -4
package/dist/database.js
CHANGED
|
@@ -330,8 +330,8 @@ export class ZoteroDatabase {
|
|
|
330
330
|
createCollection(name, parentCollectionID = null, libraryID = 1) {
|
|
331
331
|
const key = this.generateKey();
|
|
332
332
|
const result = this.execute(`
|
|
333
|
-
INSERT INTO collections (collectionName, parentCollectionID, libraryID, key, version)
|
|
334
|
-
VALUES (?, ?, ?, ?, 0)
|
|
333
|
+
INSERT INTO collections (collectionName, parentCollectionID, libraryID, key, version, clientDateModified)
|
|
334
|
+
VALUES (?, ?, ?, ?, 0, CURRENT_TIMESTAMP)
|
|
335
335
|
`, [name, parentCollectionID, libraryID, key]);
|
|
336
336
|
if (!this.readonly) {
|
|
337
337
|
this.save();
|
|
@@ -344,7 +344,7 @@ export class ZoteroDatabase {
|
|
|
344
344
|
renameCollection(collectionID, newName) {
|
|
345
345
|
const result = this.execute(`
|
|
346
346
|
UPDATE collections
|
|
347
|
-
SET collectionName = ?, version = version + 1
|
|
347
|
+
SET collectionName = ?, version = version + 1, clientDateModified = CURRENT_TIMESTAMP
|
|
348
348
|
WHERE collectionID = ?
|
|
349
349
|
`, [newName, collectionID]);
|
|
350
350
|
if (!this.readonly && result.changes > 0) {
|
|
@@ -358,7 +358,7 @@ export class ZoteroDatabase {
|
|
|
358
358
|
moveCollection(collectionID, newParentID) {
|
|
359
359
|
const result = this.execute(`
|
|
360
360
|
UPDATE collections
|
|
361
|
-
SET parentCollectionID = ?, version = version + 1
|
|
361
|
+
SET parentCollectionID = ?, version = version + 1, clientDateModified = CURRENT_TIMESTAMP
|
|
362
362
|
WHERE collectionID = ?
|
|
363
363
|
`, [newParentID, collectionID]);
|
|
364
364
|
if (!this.readonly && result.changes > 0) {
|
package/package.json
CHANGED
package/src/database.ts
CHANGED
|
@@ -409,8 +409,8 @@ export class ZoteroDatabase {
|
|
|
409
409
|
const key = this.generateKey();
|
|
410
410
|
|
|
411
411
|
const result = this.execute(`
|
|
412
|
-
INSERT INTO collections (collectionName, parentCollectionID, libraryID, key, version)
|
|
413
|
-
VALUES (?, ?, ?, ?, 0)
|
|
412
|
+
INSERT INTO collections (collectionName, parentCollectionID, libraryID, key, version, clientDateModified)
|
|
413
|
+
VALUES (?, ?, ?, ?, 0, CURRENT_TIMESTAMP)
|
|
414
414
|
`, [name, parentCollectionID, libraryID, key]);
|
|
415
415
|
|
|
416
416
|
if (!this.readonly) {
|
|
@@ -426,7 +426,7 @@ export class ZoteroDatabase {
|
|
|
426
426
|
renameCollection(collectionID: number, newName: string): boolean {
|
|
427
427
|
const result = this.execute(`
|
|
428
428
|
UPDATE collections
|
|
429
|
-
SET collectionName = ?, version = version + 1
|
|
429
|
+
SET collectionName = ?, version = version + 1, clientDateModified = CURRENT_TIMESTAMP
|
|
430
430
|
WHERE collectionID = ?
|
|
431
431
|
`, [newName, collectionID]);
|
|
432
432
|
|
|
@@ -443,7 +443,7 @@ export class ZoteroDatabase {
|
|
|
443
443
|
moveCollection(collectionID: number, newParentID: number | null): boolean {
|
|
444
444
|
const result = this.execute(`
|
|
445
445
|
UPDATE collections
|
|
446
|
-
SET parentCollectionID = ?, version = version + 1
|
|
446
|
+
SET parentCollectionID = ?, version = version + 1, clientDateModified = CURRENT_TIMESTAMP
|
|
447
447
|
WHERE collectionID = ?
|
|
448
448
|
`, [newParentID, collectionID]);
|
|
449
449
|
|