@mikro-orm/mssql 7.0.0-dev.30 → 7.0.0-dev.301
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.d.ts +1 -1
- package/MsSqlConnection.js +3 -3
- package/MsSqlDriver.d.ts +7 -4
- package/MsSqlDriver.js +18 -10
- package/MsSqlExceptionConverter.d.ts +2 -2
- package/MsSqlExceptionConverter.js +7 -4
- package/MsSqlMikroORM.d.ts +7 -8
- package/MsSqlMikroORM.js +6 -8
- package/MsSqlPlatform.d.ts +7 -4
- package/MsSqlPlatform.js +22 -16
- package/MsSqlQueryBuilder.d.ts +2 -2
- package/MsSqlQueryBuilder.js +4 -7
- package/MsSqlSchemaGenerator.d.ts +4 -3
- package/MsSqlSchemaGenerator.js +5 -5
- package/MsSqlSchemaHelper.d.ts +12 -1
- package/MsSqlSchemaHelper.js +159 -35
- package/README.md +2 -0
- package/UnicodeStringType.js +1 -1
- package/index.d.ts +2 -3
- package/index.js +1 -2
- package/package.json +34 -35
- package/tsconfig.build.tsbuildinfo +1 -0
package/MsSqlSchemaHelper.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { EnumType, SchemaHelper, StringType, TextType, Utils, } from '@mikro-orm/
|
|
1
|
+
import { EnumType, SchemaHelper, StringType, TextType, Utils, } from '@mikro-orm/sql';
|
|
2
2
|
import { UnicodeStringType } from './UnicodeStringType.js';
|
|
3
3
|
export class MsSqlSchemaHelper extends SchemaHelper {
|
|
4
4
|
static DEFAULT_VALUES = {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
true: ['1'],
|
|
6
|
+
false: ['0'],
|
|
7
7
|
'getdate()': ['current_timestamp'],
|
|
8
8
|
};
|
|
9
9
|
getManagementDbName() {
|
|
@@ -25,6 +25,24 @@ export class MsSqlSchemaHelper extends SchemaHelper {
|
|
|
25
25
|
left join sys.extended_properties ep on ep.major_id = t.id and ep.name = 'MS_Description' and ep.minor_id = 0
|
|
26
26
|
order by schema_name(t2.schema_id), t.name`;
|
|
27
27
|
}
|
|
28
|
+
getListViewsSQL() {
|
|
29
|
+
return `select v.name as view_name, schema_name(v.schema_id) as schema_name, m.definition as view_definition
|
|
30
|
+
from sys.views v
|
|
31
|
+
inner join sys.sql_modules m on v.object_id = m.object_id
|
|
32
|
+
order by schema_name(v.schema_id), v.name`;
|
|
33
|
+
}
|
|
34
|
+
async loadViews(schema, connection) {
|
|
35
|
+
const views = await connection.execute(this.getListViewsSQL());
|
|
36
|
+
for (const view of views) {
|
|
37
|
+
// Extract SELECT statement from CREATE VIEW ... AS SELECT ...
|
|
38
|
+
const match = view.view_definition?.match(/\bAS\s+(.+)$/is);
|
|
39
|
+
const definition = match?.[1]?.trim();
|
|
40
|
+
if (definition) {
|
|
41
|
+
const schemaName = view.schema_name === this.platform.getDefaultSchemaName() ? undefined : view.schema_name;
|
|
42
|
+
schema.addView(view.view_name, schemaName, definition);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
28
46
|
async getNamespaces(connection) {
|
|
29
47
|
const sql = `select name as schema_name from sys.schemas order by name`;
|
|
30
48
|
const res = await connection.execute(sql);
|
|
@@ -69,7 +87,7 @@ export class MsSqlSchemaHelper extends SchemaHelper {
|
|
|
69
87
|
where (${[...tablesBySchemas.entries()].map(([schema, tables]) => `(ic.table_name in (${tables.map(t => this.platform.quoteValue(t.table_name)).join(',')}) and ic.table_schema = '${schema}')`).join(' OR ')})
|
|
70
88
|
order by ordinal_position`;
|
|
71
89
|
const allColumns = await connection.execute(sql);
|
|
72
|
-
const str = (val) => val != null ? '' + val : val;
|
|
90
|
+
const str = (val) => (val != null ? '' + val : val);
|
|
73
91
|
const ret = {};
|
|
74
92
|
for (const col of allColumns) {
|
|
75
93
|
const mappedType = this.platform.getMappedType(col.data_type);
|
|
@@ -77,7 +95,9 @@ export class MsSqlSchemaHelper extends SchemaHelper {
|
|
|
77
95
|
const increments = col.is_identity === 1 && connection.getPlatform().isNumericColumn(mappedType);
|
|
78
96
|
const key = this.getTableKey(col);
|
|
79
97
|
/* v8 ignore next */
|
|
80
|
-
const generated = col.generation_expression
|
|
98
|
+
const generated = col.generation_expression
|
|
99
|
+
? `${col.generation_expression}${col.is_persisted ? ' persisted' : ''}`
|
|
100
|
+
: undefined;
|
|
81
101
|
let type = col.data_type;
|
|
82
102
|
if (['varchar', 'nvarchar', 'char', 'nchar', 'varbinary'].includes(col.data_type)) {
|
|
83
103
|
col.length = col.character_maximum_length;
|
|
@@ -97,7 +117,9 @@ export class MsSqlSchemaHelper extends SchemaHelper {
|
|
|
97
117
|
ret[key] ??= [];
|
|
98
118
|
ret[key].push({
|
|
99
119
|
name: col.column_name,
|
|
100
|
-
type: this.platform.isNumericColumn(mappedType)
|
|
120
|
+
type: this.platform.isNumericColumn(mappedType)
|
|
121
|
+
? col.data_type.replace(/ unsigned$/, '').replace(/\(\d+\)$/, '')
|
|
122
|
+
: type,
|
|
101
123
|
mappedType,
|
|
102
124
|
unsigned: col.data_type.endsWith(' unsigned'),
|
|
103
125
|
length: col.length,
|
|
@@ -120,25 +142,51 @@ export class MsSqlSchemaHelper extends SchemaHelper {
|
|
|
120
142
|
ind.is_primary_key as is_primary_key,
|
|
121
143
|
col.name as column_name,
|
|
122
144
|
schema_name(t.schema_id) as schema_name,
|
|
123
|
-
(case when filter_definition is not null then concat('where ', filter_definition) else null end) as expression
|
|
145
|
+
(case when filter_definition is not null then concat('where ', filter_definition) else null end) as expression,
|
|
146
|
+
ind.is_disabled as is_disabled,
|
|
147
|
+
ind.type as index_type,
|
|
148
|
+
ind.fill_factor as fill_factor,
|
|
149
|
+
ic.is_included_column as is_included_column,
|
|
150
|
+
ic.is_descending_key as is_descending_key
|
|
124
151
|
from sys.indexes ind
|
|
125
152
|
inner join sys.index_columns ic on ind.object_id = ic.object_id and ind.index_id = ic.index_id
|
|
126
153
|
inner join sys.columns col on ic.object_id = col.object_id and ic.column_id = col.column_id
|
|
127
154
|
inner join sys.tables t on ind.object_id = t.object_id
|
|
128
155
|
where
|
|
129
156
|
(${[...tablesBySchemas.entries()].map(([schema, tables]) => `(t.name in (${tables.map(t => this.platform.quoteValue(t.table_name)).join(',')}) and schema_name(t.schema_id) = '${schema}')`).join(' OR ')})
|
|
130
|
-
order by t.name, ind.name,
|
|
157
|
+
order by t.name, ind.name, ic.is_included_column, ic.key_ordinal`;
|
|
131
158
|
const allIndexes = await connection.execute(sql);
|
|
132
159
|
const ret = {};
|
|
133
160
|
for (const index of allIndexes) {
|
|
134
161
|
const key = this.getTableKey(index);
|
|
162
|
+
const isIncluded = index.is_included_column;
|
|
135
163
|
const indexDef = {
|
|
136
|
-
columnNames: [index.column_name],
|
|
164
|
+
columnNames: isIncluded ? [] : [index.column_name],
|
|
137
165
|
keyName: index.index_name,
|
|
138
166
|
unique: index.is_unique,
|
|
139
167
|
primary: index.is_primary_key,
|
|
140
168
|
constraint: index.is_unique,
|
|
141
169
|
};
|
|
170
|
+
// Capture INCLUDE columns
|
|
171
|
+
if (isIncluded) {
|
|
172
|
+
indexDef.include = [index.column_name];
|
|
173
|
+
}
|
|
174
|
+
// Capture sort order for key columns
|
|
175
|
+
if (!isIncluded && index.is_descending_key) {
|
|
176
|
+
indexDef.columns = [{ name: index.column_name, sort: 'DESC' }];
|
|
177
|
+
}
|
|
178
|
+
// Capture disabled flag
|
|
179
|
+
if (index.is_disabled) {
|
|
180
|
+
indexDef.disabled = true;
|
|
181
|
+
}
|
|
182
|
+
// Capture clustered flag (type 1 = clustered)
|
|
183
|
+
if (index.index_type === 1 && !index.is_primary_key) {
|
|
184
|
+
indexDef.clustered = true;
|
|
185
|
+
}
|
|
186
|
+
// Capture fill factor (0 means default, so only set if non-zero)
|
|
187
|
+
if (index.fill_factor > 0) {
|
|
188
|
+
indexDef.fillFactor = index.fill_factor;
|
|
189
|
+
}
|
|
142
190
|
if (!index.column_name || index.column_name.match(/[(): ,"'`]/) || index.expression?.match(/where /i)) {
|
|
143
191
|
indexDef.expression = index.expression; // required for the `getCreateIndexSQL()` call
|
|
144
192
|
indexDef.expression = this.getCreateIndexSQL(index.table_name, indexDef, !!index.expression);
|
|
@@ -193,7 +241,12 @@ export class MsSqlSchemaHelper extends SchemaHelper {
|
|
|
193
241
|
/* v8 ignore next */
|
|
194
242
|
const hasItems = (items?.length ?? 0) > 0;
|
|
195
243
|
if (item.columnName && hasItems) {
|
|
196
|
-
items = items
|
|
244
|
+
items = items
|
|
245
|
+
.map(val => val
|
|
246
|
+
.trim()
|
|
247
|
+
.replace(`[${item.columnName}]=`, '')
|
|
248
|
+
.match(/^\(?'(.*)'/)?.[1])
|
|
249
|
+
.filter(Boolean);
|
|
197
250
|
if (items.length > 0) {
|
|
198
251
|
o[item.columnName] = items.reverse();
|
|
199
252
|
}
|
|
@@ -266,7 +319,7 @@ export class MsSqlSchemaHelper extends SchemaHelper {
|
|
|
266
319
|
}
|
|
267
320
|
// convert to string first if it's not already a string or has a smaller length
|
|
268
321
|
const type = this.platform.extractSimpleType(col.fromColumn.type);
|
|
269
|
-
if (!['varchar', 'nvarchar', 'varbinary'].includes(type) ||
|
|
322
|
+
if (!['varchar', 'nvarchar', 'varbinary'].includes(type) || col.fromColumn.length < col.column.length) {
|
|
270
323
|
ret.push(`alter table ${quotedName} alter column [${col.oldColumnName}] nvarchar(max)`);
|
|
271
324
|
}
|
|
272
325
|
}
|
|
@@ -328,18 +381,21 @@ export class MsSqlSchemaHelper extends SchemaHelper {
|
|
|
328
381
|
}
|
|
329
382
|
const i = globalThis.idx;
|
|
330
383
|
globalThis.idx++;
|
|
331
|
-
constraints.push(`declare @constraint${i} varchar(100) = (select default_constraints.name from sys.all_columns`
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
384
|
+
constraints.push(`declare @constraint${i} varchar(100) = (select default_constraints.name from sys.all_columns` +
|
|
385
|
+
' join sys.tables on all_columns.object_id = tables.object_id' +
|
|
386
|
+
' join sys.schemas on tables.schema_id = schemas.schema_id' +
|
|
387
|
+
' join sys.default_constraints on all_columns.default_object_id = default_constraints.object_id' +
|
|
388
|
+
` where schemas.name = '${schemaName}' and tables.name = '${tableName}' and all_columns.name = '${column.name}')` +
|
|
389
|
+
` if @constraint${i} is not null exec('alter table ${tableNameRaw} drop constraint ' + @constraint${i})`);
|
|
337
390
|
}
|
|
338
391
|
return constraints;
|
|
339
392
|
}
|
|
340
393
|
getRenameColumnSQL(tableName, oldColumnName, to, schemaName) {
|
|
341
394
|
/* v8 ignore next */
|
|
342
|
-
const oldName = (schemaName && schemaName !== this.platform.getDefaultSchemaName() ? schemaName + '.' : '') +
|
|
395
|
+
const oldName = (schemaName && schemaName !== this.platform.getDefaultSchemaName() ? schemaName + '.' : '') +
|
|
396
|
+
tableName +
|
|
397
|
+
'.' +
|
|
398
|
+
oldColumnName;
|
|
343
399
|
const columnName = this.platform.quoteValue(to.name);
|
|
344
400
|
return `exec sp_rename ${this.platform.quoteValue(oldName)}, ${columnName}, 'COLUMN'`;
|
|
345
401
|
}
|
|
@@ -348,7 +404,10 @@ export class MsSqlSchemaHelper extends SchemaHelper {
|
|
|
348
404
|
const primaryKey = !changedProperties && !this.hasNonDefaultPrimaryKeyName(table);
|
|
349
405
|
const columnType = column.generated ? `as ${column.generated}` : column.type;
|
|
350
406
|
const col = [this.quote(column.name)];
|
|
351
|
-
if (column.autoincrement &&
|
|
407
|
+
if (column.autoincrement &&
|
|
408
|
+
!column.generated &&
|
|
409
|
+
!compositePK &&
|
|
410
|
+
(!changedProperties || changedProperties.has('autoincrement') || changedProperties.has('type'))) {
|
|
352
411
|
col.push(column.mappedType.getColumnType({ autoincrement: true }, this.platform));
|
|
353
412
|
}
|
|
354
413
|
else {
|
|
@@ -357,10 +416,15 @@ export class MsSqlSchemaHelper extends SchemaHelper {
|
|
|
357
416
|
Utils.runIfNotEmpty(() => col.push('identity(1,1)'), column.autoincrement);
|
|
358
417
|
Utils.runIfNotEmpty(() => col.push('null'), column.nullable);
|
|
359
418
|
Utils.runIfNotEmpty(() => col.push('not null'), !column.nullable && !column.generated);
|
|
360
|
-
if (column.autoincrement &&
|
|
419
|
+
if (column.autoincrement &&
|
|
420
|
+
!column.generated &&
|
|
421
|
+
!compositePK &&
|
|
422
|
+
(!changedProperties || changedProperties.has('autoincrement') || changedProperties.has('type'))) {
|
|
361
423
|
Utils.runIfNotEmpty(() => col.push('primary key'), primaryKey && column.primary);
|
|
362
424
|
}
|
|
363
|
-
const useDefault = changedProperties
|
|
425
|
+
const useDefault = changedProperties
|
|
426
|
+
? false
|
|
427
|
+
: column.default != null && column.default !== 'null' && !column.autoincrement;
|
|
364
428
|
const defaultName = this.platform.getConfig().getNamingStrategy().indexName(table.name, [column.name], 'default');
|
|
365
429
|
Utils.runIfNotEmpty(() => col.push(`constraint ${this.quote(defaultName)} default ${column.default}`), useDefault);
|
|
366
430
|
return col.join(' ');
|
|
@@ -382,17 +446,64 @@ export class MsSqlSchemaHelper extends SchemaHelper {
|
|
|
382
446
|
return parts;
|
|
383
447
|
}
|
|
384
448
|
getCreateIndexSQL(tableName, index, partialExpression = false) {
|
|
385
|
-
/* v8 ignore next
|
|
449
|
+
/* v8 ignore next */
|
|
386
450
|
if (index.expression && !partialExpression) {
|
|
387
451
|
return index.expression;
|
|
388
452
|
}
|
|
453
|
+
if (index.fillFactor != null && (index.fillFactor < 0 || index.fillFactor > 100)) {
|
|
454
|
+
throw new Error(`fillFactor must be between 0 and 100, got ${index.fillFactor} for index '${index.keyName}'`);
|
|
455
|
+
}
|
|
389
456
|
const keyName = this.quote(index.keyName);
|
|
390
|
-
|
|
391
|
-
const
|
|
457
|
+
// Only add clustered keyword when explicitly requested, otherwise omit (defaults to nonclustered)
|
|
458
|
+
const clustered = index.clustered ? 'clustered ' : '';
|
|
459
|
+
let sql = `create ${index.unique ? 'unique ' : ''}${clustered}index ${keyName} on ${this.quote(tableName)} `;
|
|
392
460
|
if (index.expression && partialExpression) {
|
|
393
|
-
return
|
|
461
|
+
return sql + `(${index.expression})` + this.getMsSqlIndexSuffix(index);
|
|
462
|
+
}
|
|
463
|
+
// Build column list with advanced options
|
|
464
|
+
const columns = this.getIndexColumns(index);
|
|
465
|
+
sql += `(${columns})`;
|
|
466
|
+
// Add INCLUDE clause for covering indexes
|
|
467
|
+
if (index.include?.length) {
|
|
468
|
+
sql += ` include (${index.include.map(c => this.quote(c)).join(', ')})`;
|
|
394
469
|
}
|
|
395
|
-
|
|
470
|
+
sql += this.getMsSqlIndexSuffix(index);
|
|
471
|
+
// Disabled indexes need to be created first, then disabled
|
|
472
|
+
if (index.disabled) {
|
|
473
|
+
sql += `;\nalter index ${keyName} on ${this.quote(tableName)} disable`;
|
|
474
|
+
}
|
|
475
|
+
return sql;
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* Build the column list for a MSSQL index.
|
|
479
|
+
*/
|
|
480
|
+
getIndexColumns(index) {
|
|
481
|
+
if (index.columns?.length) {
|
|
482
|
+
return index.columns
|
|
483
|
+
.map(col => {
|
|
484
|
+
let colDef = this.quote(col.name);
|
|
485
|
+
// MSSQL supports sort order
|
|
486
|
+
if (col.sort) {
|
|
487
|
+
colDef += ` ${col.sort}`;
|
|
488
|
+
}
|
|
489
|
+
return colDef;
|
|
490
|
+
})
|
|
491
|
+
.join(', ');
|
|
492
|
+
}
|
|
493
|
+
return index.columnNames.map(c => this.quote(c)).join(', ');
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* Get MSSQL-specific index WITH options like fill factor.
|
|
497
|
+
*/
|
|
498
|
+
getMsSqlIndexSuffix(index) {
|
|
499
|
+
const withOptions = [];
|
|
500
|
+
if (index.fillFactor != null) {
|
|
501
|
+
withOptions.push(`fillfactor = ${index.fillFactor}`);
|
|
502
|
+
}
|
|
503
|
+
if (withOptions.length > 0) {
|
|
504
|
+
return ` with (${withOptions.join(', ')})`;
|
|
505
|
+
}
|
|
506
|
+
return '';
|
|
396
507
|
}
|
|
397
508
|
createIndex(index, table, createPrimary = false) {
|
|
398
509
|
if (index.primary) {
|
|
@@ -401,13 +512,17 @@ export class MsSqlSchemaHelper extends SchemaHelper {
|
|
|
401
512
|
if (index.expression) {
|
|
402
513
|
return index.expression;
|
|
403
514
|
}
|
|
404
|
-
const
|
|
405
|
-
if (
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
515
|
+
const needsWhereClause = index.unique && index.columnNames.some(column => table.getColumn(column)?.nullable);
|
|
516
|
+
if (!needsWhereClause) {
|
|
517
|
+
return this.getCreateIndexSQL(table.getShortestName(), index);
|
|
518
|
+
}
|
|
519
|
+
// Generate without disabled suffix, insert WHERE clause, then re-add disabled
|
|
520
|
+
let sql = this.getCreateIndexSQL(table.getShortestName(), { ...index, disabled: false });
|
|
521
|
+
sql += ' where ' + index.columnNames.map(c => `${this.quote(c)} is not null`).join(' and ');
|
|
522
|
+
if (index.disabled) {
|
|
523
|
+
sql += `;\nalter index ${this.quote(index.keyName)} on ${table.getQuotedName()} disable`;
|
|
409
524
|
}
|
|
410
|
-
return
|
|
525
|
+
return sql;
|
|
411
526
|
}
|
|
412
527
|
dropForeignKey(tableName, constraintName) {
|
|
413
528
|
return `alter table ${this.quote(tableName)} drop constraint ${this.quote(constraintName)}`;
|
|
@@ -418,10 +533,16 @@ export class MsSqlSchemaHelper extends SchemaHelper {
|
|
|
418
533
|
}
|
|
419
534
|
return `if object_id('${this.quote(schema, name)}', 'U') is not null drop table ${this.quote(schema, name)}`;
|
|
420
535
|
}
|
|
536
|
+
dropViewIfExists(name, schema) {
|
|
537
|
+
const viewName = this.quote(this.getTableName(name, schema));
|
|
538
|
+
return `if object_id('${viewName}', 'V') is not null drop view ${viewName}`;
|
|
539
|
+
}
|
|
421
540
|
getAddColumnsSQL(table, columns) {
|
|
422
|
-
const adds = columns
|
|
541
|
+
const adds = columns
|
|
542
|
+
.map(column => {
|
|
423
543
|
return `${this.createTableColumn(column, table)}`;
|
|
424
|
-
})
|
|
544
|
+
})
|
|
545
|
+
.join(', ');
|
|
425
546
|
return [`alter table ${table.getQuotedName()} add ${adds}`];
|
|
426
547
|
}
|
|
427
548
|
appendComments(table) {
|
|
@@ -458,7 +579,10 @@ else
|
|
|
458
579
|
return +match[2];
|
|
459
580
|
}
|
|
460
581
|
wrap(val, type) {
|
|
461
|
-
const stringType = type instanceof StringType ||
|
|
582
|
+
const stringType = type instanceof StringType ||
|
|
583
|
+
type instanceof TextType ||
|
|
584
|
+
type instanceof EnumType ||
|
|
585
|
+
type instanceof UnicodeStringType;
|
|
462
586
|
return typeof val === 'string' && val.length > 0 && stringType ? this.platform.quoteValue(val) : val;
|
|
463
587
|
}
|
|
464
588
|
}
|
package/README.md
CHANGED
|
@@ -381,6 +381,8 @@ See also the list of contributors who [participated](https://github.com/mikro-or
|
|
|
381
381
|
|
|
382
382
|
Please ⭐️ this repository if this project helped you!
|
|
383
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
|
+
|
|
384
386
|
## 📝 License
|
|
385
387
|
|
|
386
388
|
Copyright © 2018 [Martin Adámek](https://github.com/b4nan).
|
package/UnicodeStringType.js
CHANGED
package/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export * from '@mikro-orm/
|
|
1
|
+
export * from '@mikro-orm/sql';
|
|
2
2
|
export * from './MsSqlConnection.js';
|
|
3
3
|
export * from './MsSqlDriver.js';
|
|
4
4
|
export * from './MsSqlPlatform.js';
|
|
5
5
|
export * from './MsSqlSchemaHelper.js';
|
|
6
|
-
export * from './MsSqlExceptionConverter.js';
|
|
7
6
|
export * from './UnicodeStringType.js';
|
|
8
|
-
export { MsSqlMikroORM as MikroORM, MsSqlOptions as Options, defineMsSqlConfig as defineConfig, } from './MsSqlMikroORM.js';
|
|
7
|
+
export { MsSqlMikroORM as MikroORM, type MsSqlOptions as Options, defineMsSqlConfig as defineConfig, } from './MsSqlMikroORM.js';
|
package/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export * from '@mikro-orm/
|
|
1
|
+
export * from '@mikro-orm/sql';
|
|
2
2
|
export * from './MsSqlConnection.js';
|
|
3
3
|
export * from './MsSqlDriver.js';
|
|
4
4
|
export * from './MsSqlPlatform.js';
|
|
5
5
|
export * from './MsSqlSchemaHelper.js';
|
|
6
|
-
export * from './MsSqlExceptionConverter.js';
|
|
7
6
|
export * from './UnicodeStringType.js';
|
|
8
7
|
export { MsSqlMikroORM as MikroORM, defineMsSqlConfig as defineConfig, } from './MsSqlMikroORM.js';
|
package/package.json
CHANGED
|
@@ -1,66 +1,65 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/mssql",
|
|
3
|
-
"
|
|
4
|
-
"version": "7.0.0-dev.30",
|
|
3
|
+
"version": "7.0.0-dev.301",
|
|
5
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.",
|
|
6
|
-
"exports": {
|
|
7
|
-
"./package.json": "./package.json",
|
|
8
|
-
".": "./index.js"
|
|
9
|
-
},
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "git+ssh://git@github.com/mikro-orm/mikro-orm.git"
|
|
13
|
-
},
|
|
14
5
|
"keywords": [
|
|
15
|
-
"
|
|
6
|
+
"data-mapper",
|
|
7
|
+
"ddd",
|
|
8
|
+
"entity",
|
|
9
|
+
"identity-map",
|
|
10
|
+
"javascript",
|
|
11
|
+
"js",
|
|
12
|
+
"mariadb",
|
|
13
|
+
"mikro-orm",
|
|
16
14
|
"mongo",
|
|
17
15
|
"mongodb",
|
|
18
16
|
"mysql",
|
|
19
|
-
"
|
|
17
|
+
"orm",
|
|
20
18
|
"postgresql",
|
|
21
19
|
"sqlite",
|
|
22
20
|
"sqlite3",
|
|
23
21
|
"ts",
|
|
24
22
|
"typescript",
|
|
25
|
-
"
|
|
26
|
-
"javascript",
|
|
27
|
-
"entity",
|
|
28
|
-
"ddd",
|
|
29
|
-
"mikro-orm",
|
|
30
|
-
"unit-of-work",
|
|
31
|
-
"data-mapper",
|
|
32
|
-
"identity-map"
|
|
23
|
+
"unit-of-work"
|
|
33
24
|
],
|
|
34
|
-
"
|
|
35
|
-
"license": "MIT",
|
|
25
|
+
"homepage": "https://mikro-orm.io",
|
|
36
26
|
"bugs": {
|
|
37
27
|
"url": "https://github.com/mikro-orm/mikro-orm/issues"
|
|
38
28
|
},
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"author": "Martin Adámek",
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+ssh://git@github.com/mikro-orm/mikro-orm.git"
|
|
34
|
+
},
|
|
35
|
+
"type": "module",
|
|
36
|
+
"exports": {
|
|
37
|
+
"./package.json": "./package.json",
|
|
38
|
+
".": "./index.js"
|
|
39
|
+
},
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
|
-
"build": "yarn
|
|
44
|
+
"build": "yarn compile && yarn copy",
|
|
45
45
|
"clean": "yarn run -T rimraf ./dist",
|
|
46
46
|
"compile": "yarn run -T tsc -p tsconfig.build.json",
|
|
47
47
|
"copy": "node ../../scripts/copy.mjs"
|
|
48
48
|
},
|
|
49
|
-
"publishConfig": {
|
|
50
|
-
"access": "public"
|
|
51
|
-
},
|
|
52
49
|
"dependencies": {
|
|
53
|
-
"@mikro-orm/
|
|
50
|
+
"@mikro-orm/sql": "7.0.0-dev.301",
|
|
51
|
+
"kysely": "0.28.11",
|
|
54
52
|
"tarn": "3.0.2",
|
|
55
|
-
"tedious": "19.
|
|
53
|
+
"tedious": "19.2.1",
|
|
56
54
|
"tsqlstring": "1.0.1"
|
|
57
55
|
},
|
|
58
56
|
"devDependencies": {
|
|
59
|
-
"@mikro-orm/core": "^6.
|
|
60
|
-
"kysely": "0.28.7"
|
|
57
|
+
"@mikro-orm/core": "^6.6.8"
|
|
61
58
|
},
|
|
62
59
|
"peerDependencies": {
|
|
63
|
-
"@mikro-orm/core": "7.0.0-dev.
|
|
64
|
-
|
|
60
|
+
"@mikro-orm/core": "7.0.0-dev.301"
|
|
61
|
+
},
|
|
62
|
+
"engines": {
|
|
63
|
+
"node": ">= 22.17.0"
|
|
65
64
|
}
|
|
66
65
|
}
|