@mikro-orm/mssql 7.1.5-dev.2 → 7.1.5-dev.20
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/MsSqlConnection.js +4 -3
- package/MsSqlSchemaGenerator.js +1 -1
- package/package.json +3 -3
package/MsSqlConnection.js
CHANGED
|
@@ -121,11 +121,12 @@ export class MsSqlConnection extends AbstractSqlConnection {
|
|
|
121
121
|
const selectClause = outVars.map(o => `${o.varName} as ${this.platform.quoteIdentifier(o.name)}`).join(', ');
|
|
122
122
|
batch.push(`select ${selectClause}`);
|
|
123
123
|
}
|
|
124
|
-
const
|
|
124
|
+
const rows = (await this.execute(batch.join('; '), allValues, 'all', ctx));
|
|
125
125
|
if (outVars.length === 0) {
|
|
126
|
-
return
|
|
126
|
+
// A procedure can still return result sets via SELECT without declaring OUT params —
|
|
127
|
+
// surface those rows instead of discarding them. Pure-DML procedures yield no rows.
|
|
128
|
+
return (rows.length > 0 ? rows : undefined);
|
|
127
129
|
}
|
|
128
|
-
const rows = result;
|
|
129
130
|
this.applyRoutineOutParams(rows[0] ?? {}, outVars.map(o => o.param), args);
|
|
130
131
|
return undefined;
|
|
131
132
|
}
|
package/MsSqlSchemaGenerator.js
CHANGED
|
@@ -11,7 +11,7 @@ export class MsSqlSchemaGenerator extends SchemaGenerator {
|
|
|
11
11
|
return super.clear(options);
|
|
12
12
|
}
|
|
13
13
|
// https://stackoverflow.com/questions/253849/cannot-truncate-table-because-it-is-being-referenced-by-a-foreign-key-constraint
|
|
14
|
-
for (const meta of this.
|
|
14
|
+
for (const meta of this.getOrderedMetadataForClear(options?.schema).reverse()) {
|
|
15
15
|
const res = await this.driver.nativeDelete(meta.class, {}, options);
|
|
16
16
|
if (meta.getPrimaryProps().some(pk => pk.autoincrement)) {
|
|
17
17
|
const tableName = this.driver.getTableName(meta, { schema: options?.schema }, false);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/mssql",
|
|
3
|
-
"version": "7.1.5-dev.
|
|
3
|
+
"version": "7.1.5-dev.20",
|
|
4
4
|
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data-mapper",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"copy": "node ../../scripts/copy.mjs"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@mikro-orm/sql": "7.1.5-dev.
|
|
50
|
+
"@mikro-orm/sql": "7.1.5-dev.20",
|
|
51
51
|
"kysely": "0.29.2",
|
|
52
52
|
"tarn": "3.0.2",
|
|
53
53
|
"tedious": "19.2.1",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@mikro-orm/core": "^7.1.4"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@mikro-orm/core": "7.1.5-dev.
|
|
60
|
+
"@mikro-orm/core": "7.1.5-dev.20"
|
|
61
61
|
},
|
|
62
62
|
"engines": {
|
|
63
63
|
"node": ">= 22.17.0"
|