@mikro-orm/mssql 7.0.0-dev.9 → 7.0.0-dev.91
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 +1 -1
- package/MsSqlDriver.d.ts +1 -0
- package/MsSqlDriver.js +25 -2
- package/MsSqlExceptionConverter.d.ts +2 -2
- package/MsSqlExceptionConverter.js +3 -3
- package/MsSqlMikroORM.d.ts +7 -8
- package/MsSqlMikroORM.js +6 -8
- package/MsSqlPlatform.d.ts +7 -3
- package/MsSqlPlatform.js +21 -7
- package/MsSqlQueryBuilder.js +6 -0
- package/MsSqlSchemaGenerator.d.ts +3 -2
- package/MsSqlSchemaGenerator.js +3 -3
- package/MsSqlSchemaHelper.js +1 -1
- package/README.md +3 -2
- package/UnicodeStringType.js +1 -1
- package/index.d.ts +1 -1
- package/package.json +7 -7
package/MsSqlConnection.js
CHANGED
package/MsSqlDriver.d.ts
CHANGED
|
@@ -6,4 +6,5 @@ export declare class MsSqlDriver extends AbstractSqlDriver<MsSqlConnection> {
|
|
|
6
6
|
constructor(config: Configuration);
|
|
7
7
|
nativeInsertMany<T extends AnyEntity<T>>(entityName: string, data: EntityDictionary<T>[], options?: NativeInsertUpdateManyOptions<T>): Promise<QueryResult<T>>;
|
|
8
8
|
createQueryBuilder<T extends AnyEntity<T>>(entityName: string, ctx?: Transaction, preferredConnectionType?: ConnectionType, convertCustomTypes?: boolean, loggerContext?: LoggingOptions, alias?: string, em?: SqlEntityManager): MsSqlQueryBuilder<T, any, any, any>;
|
|
9
|
+
private appendOutputTable;
|
|
9
10
|
}
|
package/MsSqlDriver.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { QueryFlag, Utils, } from '@mikro-orm/core';
|
|
1
|
+
import { QueryFlag, Utils, isRaw, } from '@mikro-orm/core';
|
|
2
2
|
import { AbstractSqlDriver } from '@mikro-orm/knex';
|
|
3
3
|
import { MsSqlConnection } from './MsSqlConnection.js';
|
|
4
4
|
import { MsSqlPlatform } from './MsSqlPlatform.js';
|
|
@@ -37,7 +37,7 @@ export class MsSqlDriver extends AbstractSqlDriver {
|
|
|
37
37
|
return `set identity_insert ${tableName} on; ${sql}; set identity_insert ${tableName} off`;
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
|
-
return super.nativeInsertMany(entityName, data, options);
|
|
40
|
+
return super.nativeInsertMany(entityName, data, options, sql => meta.hasTriggers ? this.appendOutputTable(entityName, data, sql) : sql);
|
|
41
41
|
}
|
|
42
42
|
createQueryBuilder(entityName, ctx, preferredConnectionType, convertCustomTypes, loggerContext, alias, em) {
|
|
43
43
|
// do not compute the connectionType if EM is provided as it will be computed from it in the QB later on
|
|
@@ -48,4 +48,27 @@ export class MsSqlDriver extends AbstractSqlDriver {
|
|
|
48
48
|
}
|
|
49
49
|
return qb;
|
|
50
50
|
}
|
|
51
|
+
appendOutputTable(entityName, data, sql) {
|
|
52
|
+
const meta = this.metadata.get(entityName);
|
|
53
|
+
const returningProps = meta.props
|
|
54
|
+
.filter(prop => prop.persist !== false && prop.defaultRaw || prop.autoincrement || prop.generated)
|
|
55
|
+
.filter(prop => !(prop.name in data[0]) || isRaw(data[0][prop.name]));
|
|
56
|
+
const returningFields = Utils.flatten(returningProps.map(prop => prop.fieldNames));
|
|
57
|
+
/* v8 ignore next */
|
|
58
|
+
if (returningFields.length === 0) {
|
|
59
|
+
return sql;
|
|
60
|
+
}
|
|
61
|
+
const tableName = this.getTableName(meta, {}, true);
|
|
62
|
+
const selections = returningFields
|
|
63
|
+
.map((field) => `[t].${this.platform.quoteIdentifier(field)}`)
|
|
64
|
+
.join(',');
|
|
65
|
+
const position = sql.indexOf(' values ');
|
|
66
|
+
const sqlBeforeValues = sql.substring(0, position);
|
|
67
|
+
const sqlAfterValues = sql.substring(position + 1);
|
|
68
|
+
let outputSql = `select top(0) ${selections} into #out from ${tableName} as t left join ${tableName} on 0 = 1; `;
|
|
69
|
+
outputSql += `${sqlBeforeValues} into #out ${sqlAfterValues}; `;
|
|
70
|
+
outputSql += `select ${selections} from #out as t; `;
|
|
71
|
+
outputSql += `drop table #out`;
|
|
72
|
+
return outputSql;
|
|
73
|
+
}
|
|
51
74
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ExceptionConverter, type Dictionary, type DriverException } from '@mikro-orm/core';
|
|
2
2
|
export declare class MsSqlExceptionConverter extends ExceptionConverter {
|
|
3
3
|
/**
|
|
4
|
-
* @
|
|
5
|
-
* @
|
|
4
|
+
* @see https://docs.microsoft.com/en-us/sql/relational-databases/errors-events/mssqlserver-511-database-engine-error?view=sql-server-ver15
|
|
5
|
+
* @see https://github.com/doctrine/dbal/blob/master/src/Driver/AbstractPostgreSQLDriver.php
|
|
6
6
|
*/
|
|
7
7
|
convertException(exception: Error & Dictionary): DriverException;
|
|
8
8
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ExceptionConverter, InvalidFieldNameException, NonUniqueFieldNameException, NotNullConstraintViolationException, SyntaxErrorException, TableExistsException, TableNotFoundException, UniqueConstraintViolationException, } from '@mikro-orm/core';
|
|
2
2
|
export class MsSqlExceptionConverter extends ExceptionConverter {
|
|
3
3
|
/**
|
|
4
|
-
* @
|
|
5
|
-
* @
|
|
4
|
+
* @see https://docs.microsoft.com/en-us/sql/relational-databases/errors-events/mssqlserver-511-database-engine-error?view=sql-server-ver15
|
|
5
|
+
* @see https://github.com/doctrine/dbal/blob/master/src/Driver/AbstractPostgreSQLDriver.php
|
|
6
6
|
*/
|
|
7
7
|
convertException(exception) {
|
|
8
8
|
let errno = exception.number;
|
|
9
|
-
/* v8 ignore next
|
|
9
|
+
/* v8 ignore next */
|
|
10
10
|
if ('errors' in exception && Array.isArray(exception.errors) && typeof exception.errors[0] === 'object' && 'message' in exception.errors[0]) {
|
|
11
11
|
exception.message += '\n' + exception.errors.map(e => e.message).join('\n');
|
|
12
12
|
errno ??= exception.errors[0].number;
|
package/MsSqlMikroORM.d.ts
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { MikroORM, type Options, type IDatabaseDriver, type EntityManager, type EntityManagerType } from '@mikro-orm/core';
|
|
2
|
-
import { MsSqlDriver } from './MsSqlDriver.js';
|
|
1
|
+
import { type AnyEntity, type EntityClass, type EntitySchema, MikroORM, type Options, type IDatabaseDriver, type EntityManager, type EntityManagerType } from '@mikro-orm/core';
|
|
3
2
|
import type { SqlEntityManager } from '@mikro-orm/knex';
|
|
3
|
+
import { MsSqlDriver } from './MsSqlDriver.js';
|
|
4
|
+
export type MsSqlOptions<EM extends SqlEntityManager<MsSqlDriver> = SqlEntityManager<MsSqlDriver>, Entities extends (string | EntityClass<AnyEntity> | EntitySchema)[] = (string | EntityClass<AnyEntity> | EntitySchema)[]> = Options<MsSqlDriver, EM, Entities>;
|
|
5
|
+
export declare function defineMsSqlConfig<EM extends SqlEntityManager<MsSqlDriver> = SqlEntityManager<MsSqlDriver>, Entities extends (string | EntityClass<AnyEntity> | EntitySchema)[] = (string | EntityClass<AnyEntity> | EntitySchema)[]>(options: Options<MsSqlDriver, EM, Entities>): Options<MsSqlDriver, EM, Entities>;
|
|
4
6
|
/**
|
|
5
7
|
* @inheritDoc
|
|
6
8
|
*/
|
|
7
|
-
export declare class MsSqlMikroORM<EM extends
|
|
8
|
-
private static DRIVER;
|
|
9
|
+
export declare class MsSqlMikroORM<EM extends SqlEntityManager<MsSqlDriver> = SqlEntityManager<MsSqlDriver>, Entities extends (string | EntityClass<AnyEntity> | EntitySchema)[] = (string | EntityClass<AnyEntity> | EntitySchema)[]> extends MikroORM<MsSqlDriver, EM, Entities> {
|
|
9
10
|
/**
|
|
10
11
|
* @inheritDoc
|
|
11
12
|
*/
|
|
12
|
-
static init<D extends IDatabaseDriver = MsSqlDriver, EM extends EntityManager = D[typeof EntityManagerType] & EntityManager>(options
|
|
13
|
+
static init<D extends IDatabaseDriver = MsSqlDriver, EM extends EntityManager<D> = D[typeof EntityManagerType] & EntityManager<D>, Entities extends (string | EntityClass<AnyEntity> | EntitySchema)[] = (string | EntityClass<AnyEntity> | EntitySchema)[]>(options: Options<D, EM, Entities>): Promise<MikroORM<D, EM, Entities>>;
|
|
13
14
|
/**
|
|
14
15
|
* @inheritDoc
|
|
15
16
|
*/
|
|
16
|
-
|
|
17
|
+
constructor(options: Options<MsSqlDriver, EM, Entities>);
|
|
17
18
|
}
|
|
18
|
-
export type MsSqlOptions = Options<MsSqlDriver>;
|
|
19
|
-
export declare function defineMsSqlConfig(options: MsSqlOptions): Options<MsSqlDriver, SqlEntityManager<MsSqlDriver> & EntityManager<IDatabaseDriver<import("@mikro-orm/core").Connection>>>;
|
package/MsSqlMikroORM.js
CHANGED
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
import { defineConfig, MikroORM, } from '@mikro-orm/core';
|
|
2
2
|
import { MsSqlDriver } from './MsSqlDriver.js';
|
|
3
|
+
export function defineMsSqlConfig(options) {
|
|
4
|
+
return defineConfig({ driver: MsSqlDriver, ...options });
|
|
5
|
+
}
|
|
3
6
|
/**
|
|
4
7
|
* @inheritDoc
|
|
5
8
|
*/
|
|
6
9
|
export class MsSqlMikroORM extends MikroORM {
|
|
7
|
-
static DRIVER = MsSqlDriver;
|
|
8
10
|
/**
|
|
9
11
|
* @inheritDoc
|
|
10
12
|
*/
|
|
11
13
|
static async init(options) {
|
|
12
|
-
return super.init(options);
|
|
14
|
+
return super.init(defineMsSqlConfig(options));
|
|
13
15
|
}
|
|
14
16
|
/**
|
|
15
17
|
* @inheritDoc
|
|
16
18
|
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
constructor(options) {
|
|
20
|
+
super(defineMsSqlConfig(options));
|
|
19
21
|
}
|
|
20
22
|
}
|
|
21
|
-
/* v8 ignore next 3 */
|
|
22
|
-
export function defineMsSqlConfig(options) {
|
|
23
|
-
return defineConfig({ driver: MsSqlDriver, ...options });
|
|
24
|
-
}
|
package/MsSqlPlatform.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { AbstractSqlPlatform, type EntityMetadata, type IDatabaseDriver, type
|
|
1
|
+
import { AbstractSqlPlatform, type EntityManager, type EntityMetadata, type IDatabaseDriver, type IPrimaryKey, type MikroORM, MsSqlNativeQueryBuilder, type Primary, QueryOrder, Type } from '@mikro-orm/knex';
|
|
2
2
|
import { MsSqlSchemaHelper } from './MsSqlSchemaHelper.js';
|
|
3
3
|
import { MsSqlExceptionConverter } from './MsSqlExceptionConverter.js';
|
|
4
4
|
import { MsSqlSchemaGenerator } from './MsSqlSchemaGenerator.js';
|
|
5
|
+
import type { MsSqlDriver } from './MsSqlDriver.js';
|
|
5
6
|
export declare class MsSqlPlatform extends AbstractSqlPlatform {
|
|
6
7
|
protected readonly schemaHelper: MsSqlSchemaHelper;
|
|
7
8
|
protected readonly exceptionConverter: MsSqlExceptionConverter;
|
|
8
9
|
/** @inheritDoc */
|
|
9
|
-
lookupExtensions(orm: MikroORM): void;
|
|
10
|
+
lookupExtensions(orm: MikroORM<MsSqlDriver>): void;
|
|
10
11
|
/** @inheritDoc */
|
|
11
12
|
init(orm: MikroORM): void;
|
|
12
13
|
getRollbackToSavepointSQL(savepointName: string): string;
|
|
@@ -55,9 +56,12 @@ export declare class MsSqlPlatform extends AbstractSqlPlatform {
|
|
|
55
56
|
usesEnumCheckConstraints(): boolean;
|
|
56
57
|
supportsMultipleCascadePaths(): boolean;
|
|
57
58
|
supportsMultipleStatements(): boolean;
|
|
58
|
-
quoteIdentifier(id: string
|
|
59
|
+
quoteIdentifier(id: string | {
|
|
60
|
+
toString: () => string;
|
|
61
|
+
}): string;
|
|
59
62
|
escape(value: any): string;
|
|
60
63
|
getSchemaGenerator(driver: IDatabaseDriver, em?: EntityManager): MsSqlSchemaGenerator;
|
|
61
64
|
allowsComparingTuples(): boolean;
|
|
65
|
+
getOrderByExpression(column: string, direction: QueryOrder): string[];
|
|
62
66
|
getDefaultClientUrl(): string;
|
|
63
67
|
}
|
package/MsSqlPlatform.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AbstractSqlPlatform,
|
|
1
|
+
import { AbstractSqlPlatform, ALIAS_REPLACEMENT, DoubleType, FloatType, MsSqlNativeQueryBuilder, QueryOrder, raw, RawQueryFragment, Type, } from '@mikro-orm/knex';
|
|
2
2
|
// @ts-expect-error no types available
|
|
3
3
|
import SqlString from 'tsqlstring';
|
|
4
4
|
import { MsSqlSchemaHelper } from './MsSqlSchemaHelper.js';
|
|
@@ -33,7 +33,7 @@ export class MsSqlPlatform extends AbstractSqlPlatform {
|
|
|
33
33
|
return true;
|
|
34
34
|
}
|
|
35
35
|
convertDateToJSValue(value) {
|
|
36
|
-
/* v8 ignore next
|
|
36
|
+
/* v8 ignore next */
|
|
37
37
|
if (typeof value === 'string') {
|
|
38
38
|
return value;
|
|
39
39
|
}
|
|
@@ -83,7 +83,7 @@ export class MsSqlPlatform extends AbstractSqlPlatform {
|
|
|
83
83
|
return super.getVarcharTypeDeclarationSQL(column);
|
|
84
84
|
}
|
|
85
85
|
getEnumTypeDeclarationSQL(column) {
|
|
86
|
-
if (column.items?.every(item =>
|
|
86
|
+
if (column.items?.every(item => typeof item === 'string')) {
|
|
87
87
|
return Type.getType(UnicodeStringType).getColumnType({ length: 100, ...column }, this);
|
|
88
88
|
}
|
|
89
89
|
/* v8 ignore next */
|
|
@@ -149,14 +149,14 @@ export class MsSqlPlatform extends AbstractSqlPlatform {
|
|
|
149
149
|
};
|
|
150
150
|
const cast = (key) => raw(type in types ? `cast(${key} as ${types[type]})` : key);
|
|
151
151
|
const quoteKey = (key) => key.match(/^[a-z]\w*$/i) ? key : `"${key}"`;
|
|
152
|
-
/* v8 ignore next
|
|
152
|
+
/* v8 ignore next */
|
|
153
153
|
if (path.length === 0) {
|
|
154
154
|
return cast(`json_value(${root}, '$.${b.map(quoteKey).join('.')}')`);
|
|
155
155
|
}
|
|
156
156
|
return cast(`json_value(${root}, '$.${b.map(quoteKey).join('.')}')`);
|
|
157
157
|
}
|
|
158
158
|
normalizePrimaryKey(data) {
|
|
159
|
-
/* v8 ignore next
|
|
159
|
+
/* v8 ignore next */
|
|
160
160
|
if (data instanceof UnicodeString) {
|
|
161
161
|
return data.value;
|
|
162
162
|
}
|
|
@@ -175,7 +175,7 @@ export class MsSqlPlatform extends AbstractSqlPlatform {
|
|
|
175
175
|
if (RawQueryFragment.isKnownFragment(id)) {
|
|
176
176
|
return super.quoteIdentifier(id);
|
|
177
177
|
}
|
|
178
|
-
return `[${id.replace('.', `].[`)}]`;
|
|
178
|
+
return `[${id.toString().replace('.', `].[`)}]`;
|
|
179
179
|
}
|
|
180
180
|
escape(value) {
|
|
181
181
|
if (value instanceof UnicodeString) {
|
|
@@ -189,13 +189,27 @@ export class MsSqlPlatform extends AbstractSqlPlatform {
|
|
|
189
189
|
}
|
|
190
190
|
return SqlString.escape(value);
|
|
191
191
|
}
|
|
192
|
-
/* v8 ignore next
|
|
192
|
+
/* v8 ignore next: kept for type inference only */
|
|
193
193
|
getSchemaGenerator(driver, em) {
|
|
194
194
|
return new MsSqlSchemaGenerator(em ?? driver);
|
|
195
195
|
}
|
|
196
196
|
allowsComparingTuples() {
|
|
197
197
|
return false;
|
|
198
198
|
}
|
|
199
|
+
getOrderByExpression(column, direction) {
|
|
200
|
+
switch (direction.toUpperCase()) {
|
|
201
|
+
case QueryOrder.ASC_NULLS_FIRST:
|
|
202
|
+
return [`case when ${column} is null then 0 else 1 end, ${column} asc`];
|
|
203
|
+
case QueryOrder.ASC_NULLS_LAST:
|
|
204
|
+
return [`case when ${column} is null then 1 else 0 end, ${column} asc`];
|
|
205
|
+
case QueryOrder.DESC_NULLS_FIRST:
|
|
206
|
+
return [`case when ${column} is null then 0 else 1 end, ${column} desc`];
|
|
207
|
+
case QueryOrder.DESC_NULLS_LAST:
|
|
208
|
+
return [`case when ${column} is null then 1 else 0 end, ${column} desc`];
|
|
209
|
+
default:
|
|
210
|
+
return [`${column} ${direction.toLowerCase()}`];
|
|
211
|
+
}
|
|
212
|
+
}
|
|
199
213
|
getDefaultClientUrl() {
|
|
200
214
|
return 'mssql://sa@localhost:1433';
|
|
201
215
|
}
|
package/MsSqlQueryBuilder.js
CHANGED
|
@@ -3,6 +3,12 @@ import { QueryBuilder } from '@mikro-orm/knex';
|
|
|
3
3
|
export class MsSqlQueryBuilder extends QueryBuilder {
|
|
4
4
|
insert(data) {
|
|
5
5
|
this.checkIdentityInsert(data);
|
|
6
|
+
if (!this.flags.has(QueryFlag.IDENTITY_INSERT) && this.metadata.has(this.mainAlias.entityName)) {
|
|
7
|
+
const meta = this.metadata.find(this.mainAlias.entityName);
|
|
8
|
+
if (meta.hasTriggers) {
|
|
9
|
+
this.setFlag(QueryFlag.OUTPUT_TABLE);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
6
12
|
return super.insert(data);
|
|
7
13
|
}
|
|
8
14
|
checkIdentityInsert(data) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ClearDatabaseOptions, type DropSchemaOptions, type MikroORM, SchemaGenerator } from '@mikro-orm/knex';
|
|
2
|
+
import type { MsSqlDriver } from './MsSqlDriver.js';
|
|
2
3
|
export declare class MsSqlSchemaGenerator extends SchemaGenerator {
|
|
3
|
-
static register(orm: MikroORM): void;
|
|
4
|
-
|
|
4
|
+
static register(orm: MikroORM<MsSqlDriver>): void;
|
|
5
|
+
clear(options?: ClearDatabaseOptions): Promise<void>;
|
|
5
6
|
getDropSchemaSQL(options?: Omit<DropSchemaOptions, 'dropDb'>): Promise<string>;
|
|
6
7
|
}
|
package/MsSqlSchemaGenerator.js
CHANGED
|
@@ -3,11 +3,11 @@ export class MsSqlSchemaGenerator extends SchemaGenerator {
|
|
|
3
3
|
static register(orm) {
|
|
4
4
|
orm.config.registerExtension('@mikro-orm/schema-generator', () => new MsSqlSchemaGenerator(orm.em));
|
|
5
5
|
}
|
|
6
|
-
async
|
|
6
|
+
async clear(options) {
|
|
7
7
|
// truncate by default, so no value is considered as true
|
|
8
|
-
/* v8 ignore next
|
|
8
|
+
/* v8 ignore next */
|
|
9
9
|
if (options?.truncate === false) {
|
|
10
|
-
return super.
|
|
10
|
+
return super.clear(options);
|
|
11
11
|
}
|
|
12
12
|
// https://stackoverflow.com/questions/253849/cannot-truncate-table-because-it-is-being-referenced-by-a-foreign-key-constraint
|
|
13
13
|
for (const meta of this.getOrderedMetadata(options?.schema).reverse()) {
|
package/MsSqlSchemaHelper.js
CHANGED
|
@@ -382,7 +382,7 @@ export class MsSqlSchemaHelper extends SchemaHelper {
|
|
|
382
382
|
return parts;
|
|
383
383
|
}
|
|
384
384
|
getCreateIndexSQL(tableName, index, partialExpression = false) {
|
|
385
|
-
/* v8 ignore next
|
|
385
|
+
/* v8 ignore next */
|
|
386
386
|
if (index.expression && !partialExpression) {
|
|
387
387
|
return index.expression;
|
|
388
388
|
}
|
package/README.md
CHANGED
|
@@ -11,7 +11,6 @@ TypeScript ORM for Node.js based on Data Mapper, [Unit of Work](https://mikro-or
|
|
|
11
11
|
[](https://discord.gg/w8bjxFHS7X)
|
|
12
12
|
[](https://www.npmjs.com/package/@mikro-orm/core)
|
|
13
13
|
[](https://coveralls.io/r/mikro-orm/mikro-orm?branch=master)
|
|
14
|
-
[](https://codeclimate.com/github/mikro-orm/mikro-orm/maintainability)
|
|
15
14
|
[](https://github.com/mikro-orm/mikro-orm/actions?workflow=tests)
|
|
16
15
|
|
|
17
16
|
## 🤔 Unit of What?
|
|
@@ -141,7 +140,7 @@ There is also auto-generated [CHANGELOG.md](CHANGELOG.md) file based on commit m
|
|
|
141
140
|
- [Composite and Foreign Keys as Primary Key](https://mikro-orm.io/docs/composite-keys)
|
|
142
141
|
- [Filters](https://mikro-orm.io/docs/filters)
|
|
143
142
|
- [Using `QueryBuilder`](https://mikro-orm.io/docs/query-builder)
|
|
144
|
-
- [
|
|
143
|
+
- [Populating relations](https://mikro-orm.io/docs/populating-relations)
|
|
145
144
|
- [Property Validation](https://mikro-orm.io/docs/property-validation)
|
|
146
145
|
- [Lifecycle Hooks](https://mikro-orm.io/docs/events#hooks)
|
|
147
146
|
- [Vanilla JS Support](https://mikro-orm.io/docs/usage-with-js)
|
|
@@ -382,6 +381,8 @@ See also the list of contributors who [participated](https://github.com/mikro-or
|
|
|
382
381
|
|
|
383
382
|
Please ⭐️ this repository if this project helped you!
|
|
384
383
|
|
|
384
|
+
> If you'd like to support my open-source work, consider sponsoring me directly at [github.com/sponsors/b4nan](https://github.com/sponsors/b4nan).
|
|
385
|
+
|
|
385
386
|
## 📝 License
|
|
386
387
|
|
|
387
388
|
Copyright © 2018 [Martin Adámek](https://github.com/b4nan).
|
package/UnicodeStringType.js
CHANGED
package/index.d.ts
CHANGED
|
@@ -5,4 +5,4 @@ export * from './MsSqlPlatform.js';
|
|
|
5
5
|
export * from './MsSqlSchemaHelper.js';
|
|
6
6
|
export * from './MsSqlExceptionConverter.js';
|
|
7
7
|
export * from './UnicodeStringType.js';
|
|
8
|
-
export { MsSqlMikroORM as MikroORM, MsSqlOptions as Options, defineMsSqlConfig as defineConfig, } from './MsSqlMikroORM.js';
|
|
8
|
+
export { MsSqlMikroORM as MikroORM, type MsSqlOptions as Options, defineMsSqlConfig as defineConfig, } from './MsSqlMikroORM.js';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/mssql",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.0.0-dev.
|
|
4
|
+
"version": "7.0.0-dev.91",
|
|
5
5
|
"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.",
|
|
6
6
|
"exports": {
|
|
7
7
|
"./package.json": "./package.json",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://mikro-orm.io",
|
|
40
40
|
"engines": {
|
|
41
|
-
"node": ">= 22.
|
|
41
|
+
"node": ">= 22.17.0"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "yarn clean && yarn compile && yarn copy",
|
|
@@ -50,17 +50,17 @@
|
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@mikro-orm/knex": "7.0.0-dev.
|
|
53
|
+
"@mikro-orm/knex": "7.0.0-dev.91",
|
|
54
54
|
"tarn": "3.0.2",
|
|
55
|
-
"tedious": "19.
|
|
55
|
+
"tedious": "19.1.3",
|
|
56
56
|
"tsqlstring": "1.0.1"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@mikro-orm/core": "^6.
|
|
60
|
-
"kysely": "0.28.
|
|
59
|
+
"@mikro-orm/core": "^6.6.2",
|
|
60
|
+
"kysely": "0.28.8"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@mikro-orm/core": "7.0.0-dev.
|
|
63
|
+
"@mikro-orm/core": "7.0.0-dev.91",
|
|
64
64
|
"kysely": "*"
|
|
65
65
|
}
|
|
66
66
|
}
|