@mikro-orm/mssql 7.0.0-dev.42 → 7.0.0-dev.43
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/MsSqlMikroORM.d.ts +6 -7
- package/MsSqlMikroORM.js +6 -8
- package/package.json +3 -3
package/MsSqlMikroORM.d.ts
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import { type AnyEntity, type EntityClass, type EntityClassGroup, type EntitySchema, MikroORM, type Options, type IDatabaseDriver, type EntityManager, type EntityManagerType } from '@mikro-orm/core';
|
|
2
|
-
import { MsSqlDriver } from './MsSqlDriver.js';
|
|
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> | EntityClassGroup<AnyEntity> | EntitySchema)[] = (string | EntityClass<AnyEntity> | EntityClassGroup<AnyEntity> | EntitySchema)[]> = Options<MsSqlDriver, EM, Entities>;
|
|
5
|
+
export declare function defineMsSqlConfig<EM extends SqlEntityManager<MsSqlDriver> = SqlEntityManager<MsSqlDriver>, Entities extends (string | EntityClass<AnyEntity> | EntityClassGroup<AnyEntity> | EntitySchema)[] = (string | EntityClass<AnyEntity> | EntityClassGroup<AnyEntity> | EntitySchema)[]>(options: MsSqlOptions<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> | EntityClassGroup<AnyEntity> | EntitySchema)[] = (string | EntityClass<AnyEntity> | EntityClassGroup<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, Entities extends (string | EntityClass<AnyEntity> | EntityClassGroup<AnyEntity> | EntitySchema)[] = (string | EntityClass<AnyEntity> | EntityClassGroup<AnyEntity> | EntitySchema)[]>(options
|
|
13
|
+
static init<D extends IDatabaseDriver = MsSqlDriver, EM extends EntityManager = D[typeof EntityManagerType] & EntityManager, Entities extends (string | EntityClass<AnyEntity> | EntityClassGroup<AnyEntity> | EntitySchema)[] = (string | EntityClass<AnyEntity> | EntityClassGroup<AnyEntity> | EntitySchema)[]>(options: Options<D, EM, Entities>): Promise<MikroORM<D, EM, Entities>>;
|
|
13
14
|
/**
|
|
14
15
|
* @inheritDoc
|
|
15
16
|
*/
|
|
16
|
-
|
|
17
|
+
constructor(options: MsSqlOptions<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>>, (string | EntityClass<Partial<any>> | EntityClassGroup<Partial<any>> | EntitySchema<any, never>)[]>;
|
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/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.43",
|
|
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",
|
|
@@ -50,7 +50,7 @@
|
|
|
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.43",
|
|
54
54
|
"tarn": "3.0.2",
|
|
55
55
|
"tedious": "19.1.0",
|
|
56
56
|
"tsqlstring": "1.0.1"
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"kysely": "0.28.7"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@mikro-orm/core": "7.0.0-dev.
|
|
63
|
+
"@mikro-orm/core": "7.0.0-dev.43",
|
|
64
64
|
"kysely": "*"
|
|
65
65
|
}
|
|
66
66
|
}
|