@mikro-orm/mssql 6.2.10-dev.7 → 6.2.10-dev.70

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.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.defineMsSqlConfig = exports.MsSqlMikroORM = void 0;
3
+ exports.MsSqlMikroORM = void 0;
4
+ exports.defineMsSqlConfig = defineMsSqlConfig;
4
5
  const core_1 = require("@mikro-orm/core");
5
6
  const MsSqlDriver_1 = require("./MsSqlDriver");
6
7
  /**
@@ -26,4 +27,3 @@ exports.MsSqlMikroORM = MsSqlMikroORM;
26
27
  function defineMsSqlConfig(options) {
27
28
  return (0, core_1.defineConfig)({ driver: MsSqlDriver_1.MsSqlDriver, ...options });
28
29
  }
29
- exports.defineMsSqlConfig = defineMsSqlConfig;
@@ -24,15 +24,14 @@ export declare class MsSqlPlatform extends AbstractSqlPlatform {
24
24
  getBlobDeclarationSQL(): string;
25
25
  getJsonDeclarationSQL(): string;
26
26
  getEnumTypeDeclarationSQL(column: {
27
- fieldNames: string[];
28
27
  items?: unknown[];
28
+ fieldNames: string[];
29
29
  length?: number;
30
+ unsigned?: boolean;
31
+ autoincrement?: boolean;
30
32
  }): string;
31
33
  getDefaultMappedType(type: string): Type<unknown>;
32
34
  getDefaultSchemaName(): string | undefined;
33
- getVarcharTypeDeclarationSQL(column: {
34
- length?: number;
35
- }): string;
36
35
  getUuidTypeDeclarationSQL(column: {
37
36
  length?: number;
38
37
  }): string;
package/MsSqlPlatform.js CHANGED
@@ -67,7 +67,7 @@ class MsSqlPlatform extends knex_1.AbstractSqlPlatform {
67
67
  }
68
68
  getEnumTypeDeclarationSQL(column) {
69
69
  if (column.items?.every(item => knex_1.Utils.isString(item))) {
70
- return this.getVarcharTypeDeclarationSQL({ length: 100, ...column });
70
+ return knex_1.Type.getType(UnicodeStringType_1.UnicodeStringType).getColumnType({ length: 100, ...column });
71
71
  }
72
72
  /* istanbul ignore next */
73
73
  return this.getSmallIntTypeDeclarationSQL(column);
@@ -90,9 +90,6 @@ class MsSqlPlatform extends knex_1.AbstractSqlPlatform {
90
90
  getDefaultSchemaName() {
91
91
  return 'dbo';
92
92
  }
93
- getVarcharTypeDeclarationSQL(column) {
94
- return `nvarchar(${column.length ?? 255})`;
95
- }
96
93
  getUuidTypeDeclarationSQL(column) {
97
94
  return 'uniqueidentifier';
98
95
  }
@@ -1,4 +1,4 @@
1
- import { Type, type EntityProperty } from '@mikro-orm/core';
1
+ import { Type } from '@mikro-orm/core';
2
2
  export declare class UnicodeString {
3
3
  readonly value: string;
4
4
  constructor(value: string);
@@ -8,7 +8,9 @@ export declare class UnicodeString {
8
8
  [Symbol.toPrimitive](): string;
9
9
  }
10
10
  export declare class UnicodeStringType extends Type<string | null, string | null> {
11
- getColumnType(prop: EntityProperty): string;
11
+ getColumnType(prop: {
12
+ length?: number;
13
+ }): string;
12
14
  convertToJSValue(value: string | null | UnicodeString): string | null;
13
15
  convertToDatabaseValue(value: string | null): string | null;
14
16
  get runtimeType(): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/mssql",
3
- "version": "6.2.10-dev.7",
3
+ "version": "6.2.10-dev.70",
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",
@@ -58,14 +58,14 @@
58
58
  "access": "public"
59
59
  },
60
60
  "dependencies": {
61
- "@mikro-orm/knex": "6.2.10-dev.7",
62
- "tedious": "18.2.0",
61
+ "@mikro-orm/knex": "6.2.10-dev.70",
62
+ "tedious": "18.2.1",
63
63
  "tsqlstring": "1.0.1"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@mikro-orm/core": "^6.2.9"
67
67
  },
68
68
  "peerDependencies": {
69
- "@mikro-orm/core": "6.2.10-dev.7"
69
+ "@mikro-orm/core": "6.2.10-dev.70"
70
70
  }
71
71
  }