@naturalcycles/datastore-lib 3.24.0 → 3.24.1

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.
@@ -199,10 +199,10 @@ class DatastoreDB extends db_lib_1.BaseCommonDB {
199
199
  const ops = (0, db_lib_1.mergeDBOperations)(_tx.ops);
200
200
  for await (const op of ops) {
201
201
  if (op.type === 'saveBatch') {
202
- await this.saveBatch(op.table, op.rows, { ...opt, tx });
202
+ await this.saveBatch(op.table, op.rows, { ...op.opt, ...opt, tx });
203
203
  }
204
204
  else if (op.type === 'deleteByIds') {
205
- await this.deleteByIds(op.table, op.ids, { ...opt, tx });
205
+ await this.deleteByIds(op.table, op.ids, { ...op.opt, ...opt, tx });
206
206
  }
207
207
  else {
208
208
  throw new Error(`DBOperation not supported: ${op.type}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/datastore-lib",
3
- "version": "3.24.0",
3
+ "version": "3.24.1",
4
4
  "description": "Opinionated library to work with Google Datastore",
5
5
  "scripts": {
6
6
  "prepare": "husky install"
@@ -327,9 +327,9 @@ export class DatastoreDB extends BaseCommonDB implements CommonDB {
327
327
 
328
328
  for await (const op of ops) {
329
329
  if (op.type === 'saveBatch') {
330
- await this.saveBatch(op.table, op.rows, { ...opt, tx })
330
+ await this.saveBatch(op.table, op.rows, { ...op.opt, ...opt, tx })
331
331
  } else if (op.type === 'deleteByIds') {
332
- await this.deleteByIds(op.table, op.ids, { ...opt, tx })
332
+ await this.deleteByIds(op.table, op.ids, { ...op.opt, ...opt, tx })
333
333
  } else {
334
334
  throw new Error(`DBOperation not supported: ${(op as any).type}`)
335
335
  }