typeorm 0.2.41-dev.4e7d32f → 0.2.41-dev.7b8a1e3

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.
@@ -1252,7 +1252,7 @@ var SelectQueryBuilder = /** @class */ (function (_super) {
1252
1252
  var driver = this.connection.driver;
1253
1253
  var lockTablesClause = "";
1254
1254
  if (this.expressionMap.lockTables) {
1255
- if (!(driver instanceof PostgresDriver)) {
1255
+ if (!(driver instanceof PostgresDriver || driver instanceof CockroachDriver)) {
1256
1256
  throw new TypeORMError("Lock tables not supported in selected driver");
1257
1257
  }
1258
1258
  if (this.expressionMap.lockTables.length < 1) {
@@ -1281,7 +1281,7 @@ var SelectQueryBuilder = /** @class */ (function (_super) {
1281
1281
  if (driver instanceof MysqlDriver || driver instanceof AuroraDataApiDriver || driver instanceof OracleDriver) {
1282
1282
  return " FOR UPDATE";
1283
1283
  }
1284
- else if (driver instanceof PostgresDriver) {
1284
+ else if (driver instanceof PostgresDriver || driver instanceof CockroachDriver) {
1285
1285
  return " FOR UPDATE" + lockTablesClause;
1286
1286
  }
1287
1287
  else if (driver instanceof SqlServerDriver) {
@@ -1301,7 +1301,7 @@ var SelectQueryBuilder = /** @class */ (function (_super) {
1301
1301
  throw new LockNotSupportedOnGivenDriverError();
1302
1302
  }
1303
1303
  case "pessimistic_write_or_fail":
1304
- if (driver instanceof PostgresDriver) {
1304
+ if (driver instanceof PostgresDriver || driver instanceof CockroachDriver) {
1305
1305
  return " FOR UPDATE" + lockTablesClause + " NOWAIT";
1306
1306
  }
1307
1307
  else if (driver instanceof MysqlDriver) {
@@ -1311,7 +1311,7 @@ var SelectQueryBuilder = /** @class */ (function (_super) {
1311
1311
  throw new LockNotSupportedOnGivenDriverError();
1312
1312
  }
1313
1313
  case "for_no_key_update":
1314
- if (driver instanceof PostgresDriver) {
1314
+ if (driver instanceof PostgresDriver || driver instanceof CockroachDriver) {
1315
1315
  return " FOR NO KEY UPDATE" + lockTablesClause;
1316
1316
  }
1317
1317
  else {