@mikro-orm/knex 6.3.10-dev.8 → 6.3.10
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/AbstractSqlDriver.js +7 -7
- package/package.json +3 -3
package/AbstractSqlDriver.js
CHANGED
|
@@ -532,17 +532,17 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
|
|
|
532
532
|
const keys = new Set();
|
|
533
533
|
const fields = new Set();
|
|
534
534
|
const returning = new Set();
|
|
535
|
-
|
|
536
|
-
core_1.Utils.keys(row)
|
|
535
|
+
for (const row of data) {
|
|
536
|
+
for (const k of core_1.Utils.keys(row)) {
|
|
537
537
|
keys.add(k);
|
|
538
538
|
if (core_1.Utils.isRawSql(row[k])) {
|
|
539
539
|
returning.add(k);
|
|
540
540
|
}
|
|
541
|
-
}
|
|
542
|
-
}
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
543
|
// reload generated columns and version fields
|
|
544
544
|
meta?.props
|
|
545
|
-
.filter(prop =>
|
|
545
|
+
.filter(prop => prop.generated || prop.version || prop.primary)
|
|
546
546
|
.forEach(prop => returning.add(prop.name));
|
|
547
547
|
const pkCond = core_1.Utils.flatten(meta.primaryKeys.map(pk => meta.properties[pk].fieldNames)).map(pk => `${this.platform.quoteIdentifier(pk)} = ?`).join(' and ');
|
|
548
548
|
const params = [];
|
|
@@ -561,7 +561,7 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
|
|
|
561
561
|
}
|
|
562
562
|
params.push(value);
|
|
563
563
|
};
|
|
564
|
-
|
|
564
|
+
for (const key of keys) {
|
|
565
565
|
const prop = meta.properties[key];
|
|
566
566
|
prop.fieldNames.forEach((fieldName, fieldNameIdx) => {
|
|
567
567
|
if (fields.has(fieldName)) {
|
|
@@ -586,7 +586,7 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
|
|
|
586
586
|
sql += ` else ${this.platform.quoteIdentifier(fieldName)} end, `;
|
|
587
587
|
return sql;
|
|
588
588
|
});
|
|
589
|
-
}
|
|
589
|
+
}
|
|
590
590
|
if (meta.versionProperty) {
|
|
591
591
|
const versionProperty = meta.properties[meta.versionProperty];
|
|
592
592
|
const quotedFieldName = this.platform.quoteIdentifier(versionProperty.fieldNames[0]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/knex",
|
|
3
|
-
"version": "6.3.10
|
|
3
|
+
"version": "6.3.10",
|
|
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
|
"main": "index.js",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"sqlstring": "2.3.3"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@mikro-orm/core": "^6.3.
|
|
66
|
+
"@mikro-orm/core": "^6.3.10"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@mikro-orm/core": "6.
|
|
69
|
+
"@mikro-orm/core": "^6.0.0",
|
|
70
70
|
"better-sqlite3": "*",
|
|
71
71
|
"libsql": "*",
|
|
72
72
|
"mariadb": "*"
|