@mikro-orm/mssql 7.2.0-dev.8 → 7.2.0
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/MsSqlPlatform.d.ts +3 -1
- package/MsSqlPlatform.js +6 -1
- package/README.md +1 -0
- package/package.json +4 -4
package/MsSqlPlatform.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export declare class MsSqlPlatform extends AbstractSqlPlatform {
|
|
|
8
8
|
#private;
|
|
9
9
|
protected readonly schemaHelper: MsSqlSchemaHelper;
|
|
10
10
|
protected readonly exceptionConverter: MsSqlExceptionConverter;
|
|
11
|
+
/** mssql treats null as the lowest value when no placement is requested. */
|
|
12
|
+
sortsNullsLowest(): boolean;
|
|
11
13
|
formatIndexHint(indexNames: string[]): string;
|
|
12
14
|
/** @inheritDoc */
|
|
13
15
|
lookupExtensions(orm: MikroORM<MsSqlDriver>): void;
|
|
@@ -58,7 +60,7 @@ export declare class MsSqlPlatform extends AbstractSqlPlatform {
|
|
|
58
60
|
length?: number;
|
|
59
61
|
}): string;
|
|
60
62
|
validateMetadata(meta: EntityMetadata): void;
|
|
61
|
-
getSearchJsonPropertyKey(path: string[], type: string, aliased: boolean, value?: unknown): string | RawQueryFragment;
|
|
63
|
+
getSearchJsonPropertyKey(path: string[], type: string, aliased: boolean | string, value?: unknown): string | RawQueryFragment;
|
|
62
64
|
getJsonArrayFromSQL(column: string, alias: string, properties: {
|
|
63
65
|
name: string;
|
|
64
66
|
type: string;
|
package/MsSqlPlatform.js
CHANGED
|
@@ -16,6 +16,10 @@ export class MsSqlPlatform extends AbstractSqlPlatform {
|
|
|
16
16
|
bigint: 'bigint',
|
|
17
17
|
boolean: 'bit',
|
|
18
18
|
};
|
|
19
|
+
/** mssql treats null as the lowest value when no placement is requested. */
|
|
20
|
+
sortsNullsLowest() {
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
19
23
|
formatIndexHint(indexNames) {
|
|
20
24
|
return `with (index(${indexNames.join(', ')}))`;
|
|
21
25
|
}
|
|
@@ -163,8 +167,9 @@ export class MsSqlPlatform extends AbstractSqlPlatform {
|
|
|
163
167
|
}
|
|
164
168
|
getSearchJsonPropertyKey(path, type, aliased, value) {
|
|
165
169
|
const [a, ...b] = path;
|
|
170
|
+
const alias = typeof aliased === 'string' ? this.quoteIdentifier(aliased) : `[${ALIAS_REPLACEMENT}]`;
|
|
166
171
|
/* v8 ignore next */
|
|
167
|
-
const root = aliased ?
|
|
172
|
+
const root = aliased ? `${alias}.${this.quoteIdentifier(a)}` : this.quoteIdentifier(a);
|
|
168
173
|
const types = {
|
|
169
174
|
boolean: 'bit',
|
|
170
175
|
};
|
package/README.md
CHANGED
|
@@ -24,6 +24,7 @@ npm install @mikro-orm/mysql # MySQL
|
|
|
24
24
|
npm install @mikro-orm/mariadb # MariaDB
|
|
25
25
|
npm install @mikro-orm/sqlite # SQLite
|
|
26
26
|
npm install @mikro-orm/libsql # libSQL / Turso
|
|
27
|
+
npm install @mikro-orm/sql-js # sql.js (in-memory SQLite in WASM)
|
|
27
28
|
npm install @mikro-orm/mongodb # MongoDB
|
|
28
29
|
npm install @mikro-orm/mssql # MS SQL Server
|
|
29
30
|
npm install @mikro-orm/oracledb # Oracle
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/mssql",
|
|
3
|
-
"version": "7.2.0
|
|
3
|
+
"version": "7.2.0",
|
|
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,17 +47,17 @@
|
|
|
47
47
|
"copy": "node ../../scripts/copy.mjs"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@mikro-orm/sql": "7.2.0
|
|
50
|
+
"@mikro-orm/sql": "7.2.0",
|
|
51
51
|
"kysely": "0.29.5",
|
|
52
52
|
"tarn": "3.1.2",
|
|
53
53
|
"tedious": "20.0.0",
|
|
54
54
|
"tsqlstring": "1.0.1"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@mikro-orm/core": "^7.
|
|
57
|
+
"@mikro-orm/core": "^7.2.0"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@mikro-orm/core": "7.2.0
|
|
60
|
+
"@mikro-orm/core": "7.2.0"
|
|
61
61
|
},
|
|
62
62
|
"engines": {
|
|
63
63
|
"node": ">= 22.17.0"
|