typeorm 0.2.45-dev.ea16ac2 → 0.2.45-dev.f3cfdd2
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/browser/decorator/options/ViewColumnOptions.d.ts +6 -0
- package/browser/decorator/options/ViewColumnOptions.js.map +1 -1
- package/browser/driver/aurora-data-api/AuroraDataApiQueryRunner.js +21 -14
- package/browser/driver/aurora-data-api/AuroraDataApiQueryRunner.js.map +1 -1
- package/browser/driver/cockroachdb/CockroachQueryRunner.js +19 -13
- package/browser/driver/cockroachdb/CockroachQueryRunner.js.map +1 -1
- package/browser/driver/mysql/MysqlQueryRunner.js +21 -14
- package/browser/driver/mysql/MysqlQueryRunner.js.map +1 -1
- package/browser/driver/oracle/OracleQueryRunner.js +21 -14
- package/browser/driver/oracle/OracleQueryRunner.js.map +1 -1
- package/browser/driver/postgres/PostgresQueryRunner.js +19 -13
- package/browser/driver/postgres/PostgresQueryRunner.js.map +1 -1
- package/browser/driver/sap/SapQueryRunner.js +19 -13
- package/browser/driver/sap/SapQueryRunner.js.map +1 -1
- package/browser/driver/sqlite-abstract/AbstractSqliteQueryRunner.js +21 -15
- package/browser/driver/sqlite-abstract/AbstractSqliteQueryRunner.js.map +1 -1
- package/browser/driver/sqlserver/SqlServerQueryRunner.js +23 -15
- package/browser/driver/sqlserver/SqlServerQueryRunner.js.map +1 -1
- package/browser/naming-strategy/DefaultNamingStrategy.d.ts +1 -1
- package/browser/naming-strategy/DefaultNamingStrategy.js.map +1 -1
- package/decorator/options/ViewColumnOptions.d.ts +6 -0
- package/decorator/options/ViewColumnOptions.js.map +1 -1
- package/driver/aurora-data-api/AuroraDataApiQueryRunner.js +21 -14
- package/driver/aurora-data-api/AuroraDataApiQueryRunner.js.map +1 -1
- package/driver/cockroachdb/CockroachQueryRunner.js +19 -13
- package/driver/cockroachdb/CockroachQueryRunner.js.map +1 -1
- package/driver/mysql/MysqlQueryRunner.js +21 -14
- package/driver/mysql/MysqlQueryRunner.js.map +1 -1
- package/driver/oracle/OracleQueryRunner.js +21 -14
- package/driver/oracle/OracleQueryRunner.js.map +1 -1
- package/driver/postgres/PostgresQueryRunner.js +19 -13
- package/driver/postgres/PostgresQueryRunner.js.map +1 -1
- package/driver/sap/SapQueryRunner.js +19 -13
- package/driver/sap/SapQueryRunner.js.map +1 -1
- package/driver/sqlite-abstract/AbstractSqliteQueryRunner.js +21 -15
- package/driver/sqlite-abstract/AbstractSqliteQueryRunner.js.map +1 -1
- package/driver/sqlserver/SqlServerQueryRunner.js +23 -15
- package/driver/sqlserver/SqlServerQueryRunner.js.map +1 -1
- package/naming-strategy/DefaultNamingStrategy.d.ts +1 -1
- package/naming-strategy/DefaultNamingStrategy.js.map +1 -1
- package/package.json +1 -1
|
@@ -1950,7 +1950,7 @@ var SapQueryRunner = /** @class */ (function (_super) {
|
|
|
1950
1950
|
*/
|
|
1951
1951
|
SapQueryRunner.prototype.clearDatabase = function () {
|
|
1952
1952
|
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
|
|
1953
|
-
var schemas, schemaNamesString, selectTableDropsQuery, dropTableQueries, error_2, rollbackError_1;
|
|
1953
|
+
var schemas, schemaNamesString, isAnotherTransactionActive, selectTableDropsQuery, dropTableQueries, error_2, rollbackError_1;
|
|
1954
1954
|
var _this = this;
|
|
1955
1955
|
return (0, tslib_1.__generator)(this, function (_a) {
|
|
1956
1956
|
switch (_a.label) {
|
|
@@ -1967,12 +1967,14 @@ var SapQueryRunner = /** @class */ (function (_super) {
|
|
|
1967
1967
|
schemaNamesString = schemas.map(function (name) {
|
|
1968
1968
|
return name === "current_schema" ? name : "'" + name + "'";
|
|
1969
1969
|
}).join(", ");
|
|
1970
|
+
isAnotherTransactionActive = this.isTransactionActive;
|
|
1971
|
+
if (!!isAnotherTransactionActive) return [3 /*break*/, 2];
|
|
1970
1972
|
return [4 /*yield*/, this.startTransaction()];
|
|
1971
1973
|
case 1:
|
|
1972
1974
|
_a.sent();
|
|
1973
1975
|
_a.label = 2;
|
|
1974
1976
|
case 2:
|
|
1975
|
-
_a.trys.push([2,
|
|
1977
|
+
_a.trys.push([2, 7, , 13]);
|
|
1976
1978
|
selectTableDropsQuery = "SELECT 'DROP TABLE \"' || schema_name || '\".\"' || table_name || '\" CASCADE;' as \"query\" FROM \"SYS\".\"TABLES\" WHERE \"SCHEMA_NAME\" IN (" + schemaNamesString + ") AND \"TABLE_NAME\" NOT IN ('SYS_AFL_GENERATOR_PARAMETERS') AND \"IS_COLUMN_TABLE\" = 'TRUE'";
|
|
1977
1979
|
return [4 /*yield*/, this.query(selectTableDropsQuery)];
|
|
1978
1980
|
case 3:
|
|
@@ -1980,24 +1982,28 @@ var SapQueryRunner = /** @class */ (function (_super) {
|
|
|
1980
1982
|
return [4 /*yield*/, Promise.all(dropTableQueries.map(function (q) { return _this.query(q["query"]); }))];
|
|
1981
1983
|
case 4:
|
|
1982
1984
|
_a.sent();
|
|
1985
|
+
if (!!isAnotherTransactionActive) return [3 /*break*/, 6];
|
|
1983
1986
|
return [4 /*yield*/, this.commitTransaction()];
|
|
1984
1987
|
case 5:
|
|
1985
1988
|
_a.sent();
|
|
1986
|
-
|
|
1987
|
-
case 6:
|
|
1988
|
-
error_2 = _a.sent();
|
|
1989
|
-
_a.label = 7;
|
|
1989
|
+
_a.label = 6;
|
|
1990
|
+
case 6: return [3 /*break*/, 13];
|
|
1990
1991
|
case 7:
|
|
1991
|
-
_a.
|
|
1992
|
-
|
|
1992
|
+
error_2 = _a.sent();
|
|
1993
|
+
_a.label = 8;
|
|
1993
1994
|
case 8:
|
|
1994
|
-
_a.
|
|
1995
|
-
return [3 /*break*/, 10];
|
|
1995
|
+
_a.trys.push([8, 11, , 12]);
|
|
1996
|
+
if (!!isAnotherTransactionActive) return [3 /*break*/, 10];
|
|
1997
|
+
return [4 /*yield*/, this.rollbackTransaction()];
|
|
1996
1998
|
case 9:
|
|
1999
|
+
_a.sent();
|
|
2000
|
+
_a.label = 10;
|
|
2001
|
+
case 10: return [3 /*break*/, 12];
|
|
2002
|
+
case 11:
|
|
1997
2003
|
rollbackError_1 = _a.sent();
|
|
1998
|
-
return [3 /*break*/,
|
|
1999
|
-
case
|
|
2000
|
-
case
|
|
2004
|
+
return [3 /*break*/, 12];
|
|
2005
|
+
case 12: throw error_2;
|
|
2006
|
+
case 13: return [2 /*return*/];
|
|
2001
2007
|
}
|
|
2002
2008
|
});
|
|
2003
2009
|
});
|