proto.io 0.0.149 → 0.0.150

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.
@@ -2531,7 +2531,13 @@ class PostgresStorageTransaction extends PostgresStorageClient {
2531
2531
  return this._selectLock;
2532
2532
  }
2533
2533
  atomic(callback, options) {
2534
- return callback(this);
2534
+ if (!options?.retry)
2535
+ return callback(this);
2536
+ return this.withTransaction(async (conn) => {
2537
+ if (options?.lockTable)
2538
+ await conn.lockTable(options.lockTable, true);
2539
+ return callback(conn);
2540
+ });
2535
2541
  }
2536
2542
  async withTransaction(callback) {
2537
2543
  const transaction = new PostgresStorageTransaction(this._driver, this.counter + 1, this._selectLock);