@mikro-orm/postgresql 7.0.0-dev.1 → 7.0.0-dev.2

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.
@@ -1,30 +1,24 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.PostgreSqlConnection = void 0;
7
- const type_overrides_1 = __importDefault(require("pg/lib/type-overrides"));
8
- const pg_1 = require("pg");
9
- const kysely_1 = require("kysely");
10
- const postgres_array_1 = __importDefault(require("postgres-array"));
11
- const knex_1 = require("@mikro-orm/knex");
12
- class PostgreSqlConnection extends knex_1.AbstractSqlConnection {
1
+ import TypeOverrides from 'pg/lib/type-overrides.js';
2
+ import { Pool } from 'pg';
3
+ import { PostgresDialect } from 'kysely';
4
+ import array from 'postgres-array';
5
+ import { AbstractSqlConnection, Utils } from '@mikro-orm/knex';
6
+ export class PostgreSqlConnection extends AbstractSqlConnection {
13
7
  createKyselyDialect(overrides) {
14
8
  const options = this.mapOptions(overrides);
15
- return new kysely_1.PostgresDialect({
16
- pool: new pg_1.Pool(options),
9
+ return new PostgresDialect({
10
+ pool: new Pool(options),
17
11
  onCreateConnection: this.options.onCreateConnection ?? this.config.get('onCreateConnection'),
18
12
  });
19
13
  }
20
14
  mapOptions(overrides) {
21
15
  const ret = { ...this.getConnectionOptions() };
22
16
  const pool = this.config.get('pool');
23
- knex_1.Utils.defaultValue(ret, 'min', pool?.min);
24
- knex_1.Utils.defaultValue(ret, 'max', pool?.max);
25
- knex_1.Utils.defaultValue(ret, 'idleTimeoutMillis', pool?.idleTimeoutMillis);
17
+ ret.min = pool?.min;
18
+ ret.max = pool?.max;
19
+ ret.idleTimeoutMillis = pool?.idleTimeoutMillis;
26
20
  // use `select typname, oid, typarray from pg_type order by oid` to get the list of OIDs
27
- const types = new type_overrides_1.default();
21
+ const types = new TypeOverrides();
28
22
  [
29
23
  1082, // date
30
24
  1114, // timestamp
@@ -36,9 +30,8 @@ class PostgreSqlConnection extends knex_1.AbstractSqlConnection {
36
30
  1115, // timestamp[]
37
31
  1185, // timestamptz[]
38
32
  1187, // interval[]
39
- ].forEach(oid => types.setTypeParser(oid, str => postgres_array_1.default.parse(str)));
33
+ ].forEach(oid => types.setTypeParser(oid, str => array.parse(str)));
40
34
  ret.types = types;
41
- return knex_1.Utils.mergeConfig(ret, overrides);
35
+ return Utils.mergeConfig(ret, overrides);
42
36
  }
43
37
  }
44
- exports.PostgreSqlConnection = PostgreSqlConnection;
@@ -1,6 +1,6 @@
1
1
  import type { Configuration } from '@mikro-orm/core';
2
2
  import { AbstractSqlDriver } from '@mikro-orm/knex';
3
- import { PostgreSqlConnection } from './PostgreSqlConnection';
3
+ import { PostgreSqlConnection } from './PostgreSqlConnection.js';
4
4
  export declare class PostgreSqlDriver extends AbstractSqlDriver<PostgreSqlConnection> {
5
5
  constructor(config: Configuration);
6
6
  }
@@ -1,12 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PostgreSqlDriver = void 0;
4
- const knex_1 = require("@mikro-orm/knex");
5
- const PostgreSqlConnection_1 = require("./PostgreSqlConnection");
6
- const PostgreSqlPlatform_1 = require("./PostgreSqlPlatform");
7
- class PostgreSqlDriver extends knex_1.AbstractSqlDriver {
1
+ import { AbstractSqlDriver } from '@mikro-orm/knex';
2
+ import { PostgreSqlConnection } from './PostgreSqlConnection.js';
3
+ import { PostgreSqlPlatform } from './PostgreSqlPlatform.js';
4
+ export class PostgreSqlDriver extends AbstractSqlDriver {
8
5
  constructor(config) {
9
- super(config, new PostgreSqlPlatform_1.PostgreSqlPlatform(), PostgreSqlConnection_1.PostgreSqlConnection, ['kysely', 'pg']);
6
+ super(config, new PostgreSqlPlatform(), PostgreSqlConnection, ['kysely', 'pg']);
10
7
  }
11
8
  }
12
- exports.PostgreSqlDriver = PostgreSqlDriver;
@@ -1,9 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PostgreSqlExceptionConverter = void 0;
4
- const core_1 = require("@mikro-orm/core");
5
- class PostgreSqlExceptionConverter extends core_1.ExceptionConverter {
6
- /* istanbul ignore next */
1
+ import { DeadlockException, ExceptionConverter, ForeignKeyConstraintViolationException, InvalidFieldNameException, NonUniqueFieldNameException, NotNullConstraintViolationException, SyntaxErrorException, TableExistsException, TableNotFoundException, UniqueConstraintViolationException, CheckConstraintViolationException, } from '@mikro-orm/core';
2
+ export class PostgreSqlExceptionConverter extends ExceptionConverter {
7
3
  /**
8
4
  * @link http://www.postgresql.org/docs/9.4/static/errcodes-appendix.html
9
5
  * @link https://github.com/doctrine/dbal/blob/master/src/Driver/AbstractPostgreSQLDriver.php
@@ -15,37 +11,38 @@ class PostgreSqlExceptionConverter extends core_1.ExceptionConverter {
15
11
  if (exception.hint?.toString().trim()) {
16
12
  exception.message += '\n - hint: ' + exception.hint;
17
13
  }
14
+ /* v8 ignore start */
18
15
  switch (exception.code) {
19
16
  case '40001':
20
17
  case '40P01':
21
- return new core_1.DeadlockException(exception);
18
+ return new DeadlockException(exception);
22
19
  case '0A000':
23
20
  // Foreign key constraint violations during a TRUNCATE operation
24
21
  // are considered "feature not supported" in PostgreSQL.
25
22
  if (exception.message.includes('truncate')) {
26
- return new core_1.ForeignKeyConstraintViolationException(exception);
23
+ return new ForeignKeyConstraintViolationException(exception);
27
24
  }
28
25
  break;
29
26
  case '23502':
30
- return new core_1.NotNullConstraintViolationException(exception);
27
+ return new NotNullConstraintViolationException(exception);
31
28
  case '23503':
32
- return new core_1.ForeignKeyConstraintViolationException(exception);
29
+ return new ForeignKeyConstraintViolationException(exception);
33
30
  case '23505':
34
- return new core_1.UniqueConstraintViolationException(exception);
31
+ return new UniqueConstraintViolationException(exception);
35
32
  case '23514':
36
- return new core_1.CheckConstraintViolationException(exception);
33
+ return new CheckConstraintViolationException(exception);
37
34
  case '42601':
38
- return new core_1.SyntaxErrorException(exception);
35
+ return new SyntaxErrorException(exception);
39
36
  case '42702':
40
- return new core_1.NonUniqueFieldNameException(exception);
37
+ return new NonUniqueFieldNameException(exception);
41
38
  case '42703':
42
- return new core_1.InvalidFieldNameException(exception);
39
+ return new InvalidFieldNameException(exception);
43
40
  case '42P01':
44
- return new core_1.TableNotFoundException(exception);
41
+ return new TableNotFoundException(exception);
45
42
  case '42P07':
46
- return new core_1.TableExistsException(exception);
43
+ return new TableExistsException(exception);
47
44
  }
45
+ /* v8 ignore stop */
48
46
  return super.convertException(exception);
49
47
  }
50
48
  }
51
- exports.PostgreSqlExceptionConverter = PostgreSqlExceptionConverter;
@@ -1,5 +1,5 @@
1
1
  import { MikroORM, type Options, type IDatabaseDriver, type EntityManager, type EntityManagerType } from '@mikro-orm/core';
2
- import { PostgreSqlDriver } from './PostgreSqlDriver';
2
+ import { PostgreSqlDriver } from './PostgreSqlDriver.js';
3
3
  import type { SqlEntityManager } from '@mikro-orm/knex';
4
4
  /**
5
5
  * @inheritDoc
@@ -1,14 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PostgreSqlMikroORM = void 0;
4
- exports.definePostgreSqlConfig = definePostgreSqlConfig;
5
- const core_1 = require("@mikro-orm/core");
6
- const PostgreSqlDriver_1 = require("./PostgreSqlDriver");
1
+ import { defineConfig, MikroORM, } from '@mikro-orm/core';
2
+ import { PostgreSqlDriver } from './PostgreSqlDriver.js';
7
3
  /**
8
4
  * @inheritDoc
9
5
  */
10
- class PostgreSqlMikroORM extends core_1.MikroORM {
11
- static DRIVER = PostgreSqlDriver_1.PostgreSqlDriver;
6
+ export class PostgreSqlMikroORM extends MikroORM {
7
+ static DRIVER = PostgreSqlDriver;
12
8
  /**
13
9
  * @inheritDoc
14
10
  */
@@ -22,8 +18,7 @@ class PostgreSqlMikroORM extends core_1.MikroORM {
22
18
  return super.initSync(options);
23
19
  }
24
20
  }
25
- exports.PostgreSqlMikroORM = PostgreSqlMikroORM;
26
- /* istanbul ignore next */
27
- function definePostgreSqlConfig(options) {
28
- return (0, core_1.defineConfig)({ driver: PostgreSqlDriver_1.PostgreSqlDriver, ...options });
21
+ /* v8 ignore next 3 */
22
+ export function definePostgreSqlConfig(options) {
23
+ return defineConfig({ driver: PostgreSqlDriver, ...options });
29
24
  }
@@ -1,8 +1,8 @@
1
1
  import { type IPostgresInterval } from 'postgres-interval';
2
2
  import { type IsolationLevel, type EntityProperty, Type, type SimpleColumnMeta, type Configuration } from '@mikro-orm/core';
3
3
  import { AbstractSqlPlatform, type IndexDef, PostgreSqlNativeQueryBuilder } from '@mikro-orm/knex';
4
- import { PostgreSqlSchemaHelper } from './PostgreSqlSchemaHelper';
5
- import { PostgreSqlExceptionConverter } from './PostgreSqlExceptionConverter';
4
+ import { PostgreSqlSchemaHelper } from './PostgreSqlSchemaHelper.js';
5
+ import { PostgreSqlExceptionConverter } from './PostgreSqlExceptionConverter.js';
6
6
  export declare class PostgreSqlPlatform extends AbstractSqlPlatform {
7
7
  protected readonly schemaHelper: PostgreSqlSchemaHelper;
8
8
  protected readonly exceptionConverter: PostgreSqlExceptionConverter;
@@ -1,20 +1,14 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.PostgreSqlPlatform = void 0;
7
- const pg_1 = require("pg");
8
- const postgres_date_1 = __importDefault(require("postgres-date"));
9
- const postgres_interval_1 = __importDefault(require("postgres-interval"));
10
- const core_1 = require("@mikro-orm/core");
11
- const knex_1 = require("@mikro-orm/knex");
12
- const PostgreSqlSchemaHelper_1 = require("./PostgreSqlSchemaHelper");
13
- const PostgreSqlExceptionConverter_1 = require("./PostgreSqlExceptionConverter");
14
- const FullTextType_1 = require("./types/FullTextType");
15
- class PostgreSqlPlatform extends knex_1.AbstractSqlPlatform {
16
- schemaHelper = new PostgreSqlSchemaHelper_1.PostgreSqlSchemaHelper(this);
17
- exceptionConverter = new PostgreSqlExceptionConverter_1.PostgreSqlExceptionConverter();
1
+ import { Client } from 'pg';
2
+ import parseDate from 'postgres-date';
3
+ import PostgresInterval from 'postgres-interval';
4
+ import { raw, ALIAS_REPLACEMENT, Utils, Type, RawQueryFragment, } from '@mikro-orm/core';
5
+ import { AbstractSqlPlatform, PostgreSqlNativeQueryBuilder } from '@mikro-orm/knex';
6
+ import { PostgreSqlSchemaHelper } from './PostgreSqlSchemaHelper.js';
7
+ import { PostgreSqlExceptionConverter } from './PostgreSqlExceptionConverter.js';
8
+ import { FullTextType } from './types/FullTextType.js';
9
+ export class PostgreSqlPlatform extends AbstractSqlPlatform {
10
+ schemaHelper = new PostgreSqlSchemaHelper(this);
11
+ exceptionConverter = new PostgreSqlExceptionConverter();
18
12
  setConfig(config) {
19
13
  if (config.get('forceUtcTimezone') == null) {
20
14
  config.set('forceUtcTimezone', true);
@@ -22,7 +16,7 @@ class PostgreSqlPlatform extends knex_1.AbstractSqlPlatform {
22
16
  super.setConfig(config);
23
17
  }
24
18
  createNativeQueryBuilder() {
25
- return new knex_1.PostgreSqlNativeQueryBuilder(this);
19
+ return new PostgreSqlNativeQueryBuilder(this);
26
20
  }
27
21
  usesReturningStatement() {
28
22
  return true;
@@ -43,17 +37,17 @@ class PostgreSqlPlatform extends knex_1.AbstractSqlPlatform {
43
37
  return `current_timestamp(${length})`;
44
38
  }
45
39
  getDateTimeTypeDeclarationSQL(column) {
46
- /* istanbul ignore next */
40
+ /* v8 ignore next */
47
41
  return 'timestamptz' + (column.length != null ? `(${column.length})` : '');
48
42
  }
49
43
  getDefaultDateTimeLength() {
50
44
  return 6;
51
45
  }
52
46
  convertIntervalToJSValue(value) {
53
- return (0, postgres_interval_1.default)(value);
47
+ return PostgresInterval(value);
54
48
  }
55
49
  convertIntervalToDatabaseValue(value) {
56
- if (core_1.Utils.isObject(value) && 'toPostgres' in value && typeof value.toPostgres === 'function') {
50
+ if (Utils.isObject(value) && 'toPostgres' in value && typeof value.toPostgres === 'function') {
57
51
  return value.toPostgres();
58
52
  }
59
53
  return value;
@@ -68,7 +62,7 @@ class PostgreSqlPlatform extends knex_1.AbstractSqlPlatform {
68
62
  return 'int';
69
63
  }
70
64
  getBigIntTypeDeclarationSQL(column) {
71
- /* istanbul ignore next */
65
+ /* v8 ignore next 3 */
72
66
  if (column.autoincrement) {
73
67
  return `bigserial`;
74
68
  }
@@ -81,10 +75,10 @@ class PostgreSqlPlatform extends knex_1.AbstractSqlPlatform {
81
75
  return `uuid`;
82
76
  }
83
77
  getFullTextWhereClause(prop) {
84
- if (prop.customType instanceof FullTextType_1.FullTextType) {
78
+ if (prop.customType instanceof FullTextType) {
85
79
  return `:column: @@ plainto_tsquery('${prop.customType.regconfig}', :query)`;
86
80
  }
87
- /* istanbul ignore next */
81
+ /* v8 ignore next 3 */
88
82
  if (prop.columnTypes[0] === 'tsvector') {
89
83
  return `:column: @@ plainto_tsquery('simple', :query)`;
90
84
  }
@@ -94,7 +88,7 @@ class PostgreSqlPlatform extends knex_1.AbstractSqlPlatform {
94
88
  return true;
95
89
  }
96
90
  getFullTextIndexExpression(indexName, schemaName, tableName, columns) {
97
- /* istanbul ignore next */
91
+ /* v8 ignore next */
98
92
  const quotedTableName = this.quoteIdentifier(schemaName ? `${schemaName}.${tableName}` : tableName);
99
93
  const quotedColumnNames = columns.map(c => this.quoteIdentifier(c.name));
100
94
  const quotedIndexName = this.quoteIdentifier(indexName);
@@ -133,23 +127,22 @@ class PostgreSqlPlatform extends knex_1.AbstractSqlPlatform {
133
127
  }
134
128
  getMappedType(type) {
135
129
  switch (this.extractSimpleType(type)) {
136
- case 'tsvector': return core_1.Type.getType(FullTextType_1.FullTextType);
130
+ case 'tsvector': return Type.getType(FullTextType);
137
131
  default: return super.getMappedType(type);
138
132
  }
139
133
  }
140
134
  getRegExpOperator(val, flags) {
141
- /* istanbul ignore next */
135
+ /* v8 ignore next 3 */
142
136
  if ((val instanceof RegExp && val.flags.includes('i')) || flags?.includes('i')) {
143
137
  return '~*';
144
138
  }
145
139
  return '~';
146
140
  }
141
+ /* v8 ignore next 8 */
147
142
  getRegExpValue(val) {
148
- /* istanbul ignore else */
149
143
  if (val.flags.includes('i')) {
150
144
  return { $re: val.source, $flags: val.flags };
151
145
  }
152
- /* istanbul ignore next */
153
146
  return { $re: val.source };
154
147
  }
155
148
  isBigIntProperty(prop) {
@@ -165,11 +158,11 @@ class PostgreSqlPlatform extends knex_1.AbstractSqlPlatform {
165
158
  return 'double precision';
166
159
  }
167
160
  getEnumTypeDeclarationSQL(column) {
168
- /* istanbul ignore next */
161
+ /* v8 ignore next 3 */
169
162
  if (column.nativeEnumName) {
170
163
  return column.nativeEnumName;
171
164
  }
172
- if (column.items?.every(item => core_1.Utils.isString(item))) {
165
+ if (column.items?.every(item => Utils.isString(item))) {
173
166
  return 'text';
174
167
  }
175
168
  return `smallint`;
@@ -228,17 +221,17 @@ class PostgreSqlPlatform extends knex_1.AbstractSqlPlatform {
228
221
  getSearchJsonPropertyKey(path, type, aliased, value) {
229
222
  const first = path.shift();
230
223
  const last = path.pop();
231
- const root = this.quoteIdentifier(aliased ? `${core_1.ALIAS_REPLACEMENT}.${first}` : first);
224
+ const root = this.quoteIdentifier(aliased ? `${ALIAS_REPLACEMENT}.${first}` : first);
232
225
  type = typeof type === 'string' ? this.getMappedType(type).runtimeType : String(type);
233
226
  const types = {
234
227
  number: 'float8',
235
228
  bigint: 'int8',
236
229
  boolean: 'bool',
237
230
  };
238
- const cast = (key) => (0, core_1.raw)(type in types ? `(${key})::${types[type]}` : key);
231
+ const cast = (key) => raw(type in types ? `(${key})::${types[type]}` : key);
239
232
  let lastOperator = '->>';
240
233
  // force `->` for operator payloads with array values
241
- if (core_1.Utils.isPlainObject(value) && Object.keys(value).every(key => core_1.Utils.isArrayOperator(key) && Array.isArray(value[key]))) {
234
+ if (Utils.isPlainObject(value) && Object.keys(value).every(key => Utils.isArrayOperator(key) && Array.isArray(value[key]))) {
242
235
  lastOperator = '->';
243
236
  }
244
237
  if (path.length === 0) {
@@ -262,14 +255,14 @@ class PostgreSqlPlatform extends knex_1.AbstractSqlPlatform {
262
255
  });
263
256
  }
264
257
  quoteIdentifier(id, quote = '"') {
265
- if (core_1.RawQueryFragment.isKnownFragment(id)) {
258
+ if (RawQueryFragment.isKnownFragment(id)) {
266
259
  return super.quoteIdentifier(id);
267
260
  }
268
261
  return `${quote}${id.replace('.', `${quote}.${quote}`)}${quote}`;
269
262
  }
270
263
  escape(value) {
271
264
  if (typeof value === 'string') {
272
- return pg_1.Client.prototype.escapeLiteral(value);
265
+ return Client.prototype.escapeLiteral(value);
273
266
  }
274
267
  if (value instanceof Date) {
275
268
  return `'${this.formatDate(value)}'`;
@@ -290,14 +283,14 @@ class PostgreSqlPlatform extends knex_1.AbstractSqlPlatform {
290
283
  let offset = -date.getTimezoneOffset();
291
284
  let year = date.getFullYear();
292
285
  const isBCYear = year < 1;
293
- /* istanbul ignore next */
286
+ /* v8 ignore next 3 */
294
287
  if (isBCYear) {
295
288
  year = Math.abs(year) + 1;
296
289
  }
297
290
  const datePart = `${this.pad(year, 4)}-${this.pad(date.getMonth() + 1, 2)}-${this.pad(date.getDate(), 2)}`;
298
291
  const timePart = `${this.pad(date.getHours(), 2)}:${this.pad(date.getMinutes(), 2)}:${this.pad(date.getSeconds(), 2)}.${this.pad(date.getMilliseconds(), 3)}`;
299
292
  let ret = `${datePart}T${timePart}`;
300
- /* istanbul ignore if */
293
+ /* v8 ignore next 4 */
301
294
  if (offset < 0) {
302
295
  ret += '-';
303
296
  offset *= -1;
@@ -306,7 +299,7 @@ class PostgreSqlPlatform extends knex_1.AbstractSqlPlatform {
306
299
  ret += '+';
307
300
  }
308
301
  ret += this.pad(Math.floor(offset / 60), 2) + ':' + this.pad(offset % 60, 2);
309
- /* istanbul ignore next */
302
+ /* v8 ignore next 3 */
310
303
  if (isBCYear) {
311
304
  ret += ' BC';
312
305
  }
@@ -355,14 +348,14 @@ class PostgreSqlPlatform extends knex_1.AbstractSqlPlatform {
355
348
  const indexName = super.getIndexName(tableName, columns, type);
356
349
  if (indexName.length > 63) {
357
350
  const suffix = type === 'primary' ? 'pkey' : type;
358
- return `${indexName.substring(0, 55 - type.length)}_${core_1.Utils.hash(indexName, 5)}_${suffix}`;
351
+ return `${indexName.substring(0, 55 - type.length)}_${Utils.hash(indexName, 5)}_${suffix}`;
359
352
  }
360
353
  return indexName;
361
354
  }
362
355
  getDefaultPrimaryName(tableName, columns) {
363
356
  const indexName = `${tableName}_pkey`;
364
357
  if (indexName.length > 63) {
365
- return `${indexName.substring(0, 55 - 'pkey'.length)}_${core_1.Utils.hash(indexName, 5)}_pkey`;
358
+ return `${indexName.substring(0, 55 - 'pkey'.length)}_${Utils.hash(indexName, 5)}_pkey`;
366
359
  }
367
360
  return indexName;
368
361
  }
@@ -384,12 +377,13 @@ class PostgreSqlPlatform extends knex_1.AbstractSqlPlatform {
384
377
  if (typeof value === 'string' && value.charAt(10) === 'T') {
385
378
  return new Date(value);
386
379
  }
387
- /* istanbul ignore next */
380
+ /* v8 ignore next 3 */
388
381
  if (typeof value === 'number') {
389
382
  return new Date(value);
390
383
  }
391
- const parsed = (0, postgres_date_1.default)(value);
392
- /* istanbul ignore next */
384
+ // @ts-ignore fix wrong type resolution during build
385
+ const parsed = parseDate(value);
386
+ /* v8 ignore next 3 */
393
387
  if (parsed === null) {
394
388
  return value;
395
389
  }
@@ -399,4 +393,3 @@ class PostgreSqlPlatform extends knex_1.AbstractSqlPlatform {
399
393
  return 'postgresql://postgres@127.0.0.1:5432';
400
394
  }
401
395
  }
402
- exports.PostgreSqlPlatform = PostgreSqlPlatform;
@@ -1,9 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PostgreSqlSchemaHelper = void 0;
4
- const core_1 = require("@mikro-orm/core");
5
- const knex_1 = require("@mikro-orm/knex");
6
- class PostgreSqlSchemaHelper extends knex_1.SchemaHelper {
1
+ import { EnumType, Type, Utils, DeferMode } from '@mikro-orm/core';
2
+ import { SchemaHelper, } from '@mikro-orm/knex';
3
+ export class PostgreSqlSchemaHelper extends SchemaHelper {
7
4
  static DEFAULT_VALUES = {
8
5
  'now()': ['now()', 'current_timestamp'],
9
6
  'current_timestamp(?)': ['current_timestamp(?)'],
@@ -40,11 +37,11 @@ class PostgreSqlSchemaHelper extends knex_1.SchemaHelper {
40
37
  return res.map(row => row.schema_name);
41
38
  }
42
39
  getIgnoredNamespacesConditionSQL(column = 'schema_name') {
43
- /* istanbul ignore next */
44
40
  const ignored = [
45
41
  'information_schema',
46
42
  'tiger',
47
43
  'topology',
44
+ /* v8 ignore next */
48
45
  ...this.platform.getConfig().get('schemaGenerator').ignoreSchema ?? [],
49
46
  ].map(s => this.platform.quoteValue(s)).join(', ');
50
47
  const ignoredPrefixes = [
@@ -91,13 +88,13 @@ class PostgreSqlSchemaHelper extends knex_1.SchemaHelper {
91
88
  primary: index.primary,
92
89
  };
93
90
  if (index.condeferrable) {
94
- indexDef.deferMode = index.condeferred ? core_1.DeferMode.INITIALLY_DEFERRED : core_1.DeferMode.INITIALLY_IMMEDIATE;
91
+ indexDef.deferMode = index.condeferred ? DeferMode.INITIALLY_DEFERRED : DeferMode.INITIALLY_IMMEDIATE;
95
92
  }
96
93
  if (index.index_def.some((col) => col.match(/[(): ,"'`]/)) || index.expression?.match(/ where /i)) {
97
94
  indexDef.expression = index.expression;
98
95
  }
99
96
  if (index.deferrable) {
100
- indexDef.deferMode = index.initially_deferred ? core_1.DeferMode.INITIALLY_DEFERRED : core_1.DeferMode.INITIALLY_IMMEDIATE;
97
+ indexDef.deferMode = index.initially_deferred ? DeferMode.INITIALLY_DEFERRED : DeferMode.INITIALLY_IMMEDIATE;
101
98
  }
102
99
  ret[key] ??= [];
103
100
  ret[key].push(indexDef);
@@ -166,7 +163,7 @@ class PostgreSqlSchemaHelper extends knex_1.SchemaHelper {
166
163
  comment: col.column_comment,
167
164
  };
168
165
  if (nativeEnums?.[column.type]) {
169
- column.mappedType = core_1.Type.getType(core_1.EnumType);
166
+ column.mappedType = Type.getType(EnumType);
170
167
  column.nativeEnumName = column.type;
171
168
  column.enumItems = nativeEnums[column.type]?.items;
172
169
  }
@@ -214,7 +211,7 @@ class PostgreSqlSchemaHelper extends knex_1.SchemaHelper {
214
211
  if (match) {
215
212
  return match[1];
216
213
  }
217
- /* istanbul ignore next */
214
+ /* v8 ignore next 8 */
218
215
  switch (value) {
219
216
  case 'r': return 'RESTRICT';
220
217
  case 'c': return 'CASCADE';
@@ -228,7 +225,7 @@ class PostgreSqlSchemaHelper extends knex_1.SchemaHelper {
228
225
  fk.update_rule = mapReferentialIntegrity(fk.update_rule, fk.constraint_def);
229
226
  fk.delete_rule = mapReferentialIntegrity(fk.delete_rule, fk.constraint_def);
230
227
  if (fk.condeferrable) {
231
- fk.defer_mode = fk.condeferred ? core_1.DeferMode.INITIALLY_DEFERRED : core_1.DeferMode.INITIALLY_IMMEDIATE;
228
+ fk.defer_mode = fk.condeferred ? DeferMode.INITIALLY_DEFERRED : DeferMode.INITIALLY_IMMEDIATE;
232
229
  }
233
230
  const key = this.getTableKey(fk);
234
231
  ret[key] ??= [];
@@ -241,7 +238,7 @@ class PostgreSqlSchemaHelper extends knex_1.SchemaHelper {
241
238
  return ret;
242
239
  }
243
240
  async getNativeEnumDefinitions(connection, schemas) {
244
- const uniqueSchemas = core_1.Utils.unique(schemas);
241
+ const uniqueSchemas = Utils.unique(schemas);
245
242
  const res = await connection.execute(`select t.typname as enum_name, n.nspname as schema_name, array_agg(e.enumlabel order by e.enumsortorder) as enum_value
246
243
  from pg_type t
247
244
  join pg_enum e on t.oid = e.enumtypid
@@ -302,7 +299,7 @@ class PostgreSqlSchemaHelper extends knex_1.SchemaHelper {
302
299
  if (item.columnName && m1 && m2) {
303
300
  const m3 = m2[1].match(/('[^']*'::text)/g);
304
301
  let items;
305
- /* istanbul ignore else */
302
+ /* v8 ignore next 5 */
306
303
  if (m3) {
307
304
  items = m3.map((item) => item.trim().match(/^\(?'(.*)'/)?.[1]);
308
305
  }
@@ -347,14 +344,14 @@ class PostgreSqlSchemaHelper extends knex_1.SchemaHelper {
347
344
  columnType += ` generated always as ${column.generated}`;
348
345
  }
349
346
  col.push(columnType);
350
- core_1.Utils.runIfNotEmpty(() => col.push('null'), column.nullable);
351
- core_1.Utils.runIfNotEmpty(() => col.push('not null'), !column.nullable);
347
+ Utils.runIfNotEmpty(() => col.push('null'), column.nullable);
348
+ Utils.runIfNotEmpty(() => col.push('not null'), !column.nullable);
352
349
  }
353
350
  if (column.autoincrement && !column.generated && !compositePK) {
354
- core_1.Utils.runIfNotEmpty(() => col.push('primary key'), primaryKey && column.primary);
351
+ Utils.runIfNotEmpty(() => col.push('primary key'), primaryKey && column.primary);
355
352
  }
356
353
  const useDefault = column.default != null && column.default !== 'null' && !column.autoincrement;
357
- core_1.Utils.runIfNotEmpty(() => col.push(`default ${column.default}`), useDefault);
354
+ Utils.runIfNotEmpty(() => col.push(`default ${column.default}`), useDefault);
358
355
  return col.join(' ');
359
356
  }
360
357
  getPreAlterTable(tableDiff, safe) {
@@ -362,11 +359,11 @@ class PostgreSqlSchemaHelper extends knex_1.SchemaHelper {
362
359
  const parts = tableDiff.name.split('.');
363
360
  const tableName = parts.pop();
364
361
  const schemaName = parts.pop();
365
- /* istanbul ignore next */
362
+ /* v8 ignore next */
366
363
  const name = (schemaName && schemaName !== this.platform.getDefaultSchemaName() ? schemaName + '.' : '') + tableName;
367
364
  const quotedName = this.quote(name);
368
365
  // detect that the column was an enum before and remove the check constraint in such case here
369
- const changedEnums = Object.values(tableDiff.changedColumns).filter(col => col.fromColumn.mappedType instanceof core_1.EnumType);
366
+ const changedEnums = Object.values(tableDiff.changedColumns).filter(col => col.fromColumn.mappedType instanceof EnumType);
370
367
  for (const col of changedEnums) {
371
368
  if (!col.fromColumn.nativeEnumName && col.column.nativeEnumName && col.fromColumn.default) {
372
369
  ret.push(`alter table ${quotedName} alter column "${col.column.name}" drop default`);
@@ -401,11 +398,11 @@ class PostgreSqlSchemaHelper extends knex_1.SchemaHelper {
401
398
  const parts = tableDiff.name.split('.');
402
399
  const tableName = parts.pop();
403
400
  const schemaName = parts.pop();
404
- /* istanbul ignore next */
401
+ /* v8 ignore next */
405
402
  const name = (schemaName && schemaName !== this.platform.getDefaultSchemaName() ? schemaName + '.' : '') + tableName;
406
403
  const quotedName = this.quote(name);
407
404
  // detect that the column was an enum before and remove the check constraint in such a case here
408
- const changedEnums = Object.values(tableDiff.changedColumns).filter(col => col.fromColumn.mappedType instanceof core_1.EnumType);
405
+ const changedEnums = Object.values(tableDiff.changedColumns).filter(col => col.fromColumn.mappedType instanceof EnumType);
409
406
  for (const col of changedEnums) {
410
407
  if (!col.fromColumn.nativeEnumName && col.column.nativeEnumName && col.column.default) {
411
408
  ret.push(`alter table ${quotedName} alter column "${col.column.name}" set default ${col.column.default}`);
@@ -421,9 +418,8 @@ class PostgreSqlSchemaHelper extends knex_1.SchemaHelper {
421
418
  }
422
419
  getAlterColumnAutoincrement(tableName, column, schemaName) {
423
420
  const ret = [];
424
- /* istanbul ignore next */
421
+ /* v8 ignore next */
425
422
  const name = (schemaName && schemaName !== this.platform.getDefaultSchemaName() ? schemaName + '.' : '') + tableName;
426
- /* istanbul ignore else */
427
423
  if (column.autoincrement) {
428
424
  const seqName = this.platform.getIndexName(tableName, [column.name], 'sequence');
429
425
  ret.push(`create sequence if not exists ${this.quote(seqName)}`);
@@ -543,4 +539,3 @@ class PostgreSqlSchemaHelper extends knex_1.SchemaHelper {
543
539
  return +match[2];
544
540
  }
545
541
  }
546
- exports.PostgreSqlSchemaHelper = PostgreSqlSchemaHelper;
package/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  export * from '@mikro-orm/knex';
2
- export * from './PostgreSqlConnection';
3
- export * from './PostgreSqlDriver';
4
- export * from './PostgreSqlPlatform';
5
- export * from './PostgreSqlSchemaHelper';
6
- export * from './PostgreSqlExceptionConverter';
7
- export * from './types';
8
- export { PostgreSqlMikroORM as MikroORM, PostgreSqlOptions as Options, definePostgreSqlConfig as defineConfig, } from './PostgreSqlMikroORM';
2
+ export * from './PostgreSqlConnection.js';
3
+ export * from './PostgreSqlDriver.js';
4
+ export * from './PostgreSqlPlatform.js';
5
+ export * from './PostgreSqlSchemaHelper.js';
6
+ export * from './PostgreSqlExceptionConverter.js';
7
+ export * from './types/index.js';
8
+ export { PostgreSqlMikroORM as MikroORM, PostgreSqlOptions as Options, definePostgreSqlConfig as defineConfig, } from './PostgreSqlMikroORM.js';
package/index.js CHANGED
@@ -1,28 +1,8 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.defineConfig = exports.MikroORM = void 0;
18
- /* istanbul ignore file */
19
- __exportStar(require("@mikro-orm/knex"), exports);
20
- __exportStar(require("./PostgreSqlConnection"), exports);
21
- __exportStar(require("./PostgreSqlDriver"), exports);
22
- __exportStar(require("./PostgreSqlPlatform"), exports);
23
- __exportStar(require("./PostgreSqlSchemaHelper"), exports);
24
- __exportStar(require("./PostgreSqlExceptionConverter"), exports);
25
- __exportStar(require("./types"), exports);
26
- var PostgreSqlMikroORM_1 = require("./PostgreSqlMikroORM");
27
- Object.defineProperty(exports, "MikroORM", { enumerable: true, get: function () { return PostgreSqlMikroORM_1.PostgreSqlMikroORM; } });
28
- Object.defineProperty(exports, "defineConfig", { enumerable: true, get: function () { return PostgreSqlMikroORM_1.definePostgreSqlConfig; } });
1
+ export * from '@mikro-orm/knex';
2
+ export * from './PostgreSqlConnection.js';
3
+ export * from './PostgreSqlDriver.js';
4
+ export * from './PostgreSqlPlatform.js';
5
+ export * from './PostgreSqlSchemaHelper.js';
6
+ export * from './PostgreSqlExceptionConverter.js';
7
+ export * from './types/index.js';
8
+ export { PostgreSqlMikroORM as MikroORM, definePostgreSqlConfig as defineConfig, } from './PostgreSqlMikroORM.js';
package/package.json CHANGED
@@ -1,19 +1,11 @@
1
1
  {
2
2
  "name": "@mikro-orm/postgresql",
3
- "version": "7.0.0-dev.1",
3
+ "type": "module",
4
+ "version": "7.0.0-dev.2",
4
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.",
5
- "main": "index.js",
6
- "module": "index.mjs",
7
- "typings": "index.d.ts",
8
6
  "exports": {
9
7
  "./package.json": "./package.json",
10
- ".": {
11
- "import": {
12
- "types": "./index.d.ts",
13
- "default": "./index.mjs"
14
- },
15
- "require": "./index.js"
16
- }
8
+ ".": "./index.js"
17
9
  },
18
10
  "repository": {
19
11
  "type": "git",
@@ -49,7 +41,7 @@
49
41
  "node": ">= 22.11.0"
50
42
  },
51
43
  "scripts": {
52
- "build": "yarn clean && yarn compile && yarn copy && yarn run -T gen-esm-wrapper index.js index.mjs",
44
+ "build": "yarn clean && yarn compile && yarn copy",
53
45
  "clean": "yarn run -T rimraf ./dist",
54
46
  "compile": "yarn run -T tsc -p tsconfig.build.json",
55
47
  "copy": "node ../../scripts/copy.mjs"
@@ -58,7 +50,7 @@
58
50
  "access": "public"
59
51
  },
60
52
  "dependencies": {
61
- "@mikro-orm/knex": "7.0.0-dev.1",
53
+ "@mikro-orm/knex": "7.0.0-dev.2",
62
54
  "pg": "8.13.1",
63
55
  "postgres-array": "3.0.2",
64
56
  "postgres-date": "2.1.0",
@@ -69,7 +61,7 @@
69
61
  "kysely": "https://pkg.pr.new/kysely-org/kysely/kysely@2b7007e"
70
62
  },
71
63
  "peerDependencies": {
72
- "@mikro-orm/core": "7.0.0-dev.1",
64
+ "@mikro-orm/core": "7.0.0-dev.2",
73
65
  "kysely": "*"
74
66
  }
75
67
  }
@@ -1,5 +1,5 @@
1
1
  import { Type, type TransformContext, type RawQueryFragment } from '@mikro-orm/core';
2
- import type { PostgreSqlPlatform } from '../PostgreSqlPlatform';
2
+ import type { PostgreSqlPlatform } from '../PostgreSqlPlatform.js';
3
3
  type FullTextWeight = 'A' | 'B' | 'C' | 'D';
4
4
  export type WeightedFullTextValue = {
5
5
  [K in FullTextWeight]?: string | null;
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FullTextType = void 0;
4
- const core_1 = require("@mikro-orm/core");
5
- class FullTextType extends core_1.Type {
1
+ import { raw, Type } from '@mikro-orm/core';
2
+ export class FullTextType extends Type {
6
3
  regconfig;
7
4
  constructor(regconfig = 'simple') {
8
5
  super();
@@ -54,10 +51,9 @@ class FullTextType extends core_1.Type {
54
51
  return null;
55
52
  }
56
53
  // Join all the `setweight` parts using the PostgreSQL tsvector `||` concatenation operator
57
- return (0, core_1.raw)(sqlParts.join(' || '), bindings);
54
+ return raw(sqlParts.join(' || '), bindings);
58
55
  }
59
56
  // if it's not an object, it is expected to be string which does not have to be wrapped in setweight.
60
- return (0, core_1.raw)('to_tsvector(?, ?)', [this.regconfig, value]);
57
+ return raw('to_tsvector(?, ?)', [this.regconfig, value]);
61
58
  }
62
59
  }
63
- exports.FullTextType = FullTextType;
package/types/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from './FullTextType';
1
+ export * from './FullTextType.js';
package/types/index.js CHANGED
@@ -1,17 +1 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./FullTextType"), exports);
1
+ export * from './FullTextType.js';
package/index.mjs DELETED
@@ -1,238 +0,0 @@
1
- import mod from "./index.js";
2
-
3
- export default mod;
4
- export const ALIAS_REPLACEMENT = mod.ALIAS_REPLACEMENT;
5
- export const ALIAS_REPLACEMENT_RE = mod.ALIAS_REPLACEMENT_RE;
6
- export const ARRAY_OPERATORS = mod.ARRAY_OPERATORS;
7
- export const AbstractNamingStrategy = mod.AbstractNamingStrategy;
8
- export const AbstractSchemaGenerator = mod.AbstractSchemaGenerator;
9
- export const AbstractSqlConnection = mod.AbstractSqlConnection;
10
- export const AbstractSqlDriver = mod.AbstractSqlDriver;
11
- export const AbstractSqlPlatform = mod.AbstractSqlPlatform;
12
- export const AfterCreate = mod.AfterCreate;
13
- export const AfterDelete = mod.AfterDelete;
14
- export const AfterUpdate = mod.AfterUpdate;
15
- export const AfterUpsert = mod.AfterUpsert;
16
- export const ArrayCollection = mod.ArrayCollection;
17
- export const ArrayCriteriaNode = mod.ArrayCriteriaNode;
18
- export const ArrayType = mod.ArrayType;
19
- export const BaseEntity = mod.BaseEntity;
20
- export const BaseSqliteConnection = mod.BaseSqliteConnection;
21
- export const BaseSqlitePlatform = mod.BaseSqlitePlatform;
22
- export const BeforeCreate = mod.BeforeCreate;
23
- export const BeforeDelete = mod.BeforeDelete;
24
- export const BeforeUpdate = mod.BeforeUpdate;
25
- export const BeforeUpsert = mod.BeforeUpsert;
26
- export const BigIntType = mod.BigIntType;
27
- export const BlobType = mod.BlobType;
28
- export const BooleanType = mod.BooleanType;
29
- export const Cascade = mod.Cascade;
30
- export const ChangeSet = mod.ChangeSet;
31
- export const ChangeSetComputer = mod.ChangeSetComputer;
32
- export const ChangeSetPersister = mod.ChangeSetPersister;
33
- export const ChangeSetType = mod.ChangeSetType;
34
- export const CharacterType = mod.CharacterType;
35
- export const Check = mod.Check;
36
- export const CheckConstraintViolationException = mod.CheckConstraintViolationException;
37
- export const Collection = mod.Collection;
38
- export const CommitOrderCalculator = mod.CommitOrderCalculator;
39
- export const Config = mod.Config;
40
- export const Configuration = mod.Configuration;
41
- export const ConfigurationLoader = mod.ConfigurationLoader;
42
- export const Connection = mod.Connection;
43
- export const ConnectionException = mod.ConnectionException;
44
- export const ConstraintViolationException = mod.ConstraintViolationException;
45
- export const CreateRequestContext = mod.CreateRequestContext;
46
- export const CriteriaNode = mod.CriteriaNode;
47
- export const CriteriaNodeFactory = mod.CriteriaNodeFactory;
48
- export const Cursor = mod.Cursor;
49
- export const CursorError = mod.CursorError;
50
- export const DatabaseDriver = mod.DatabaseDriver;
51
- export const DatabaseObjectExistsException = mod.DatabaseObjectExistsException;
52
- export const DatabaseObjectNotFoundException = mod.DatabaseObjectNotFoundException;
53
- export const DatabaseSchema = mod.DatabaseSchema;
54
- export const DatabaseTable = mod.DatabaseTable;
55
- export const DataloaderType = mod.DataloaderType;
56
- export const DataloaderUtils = mod.DataloaderUtils;
57
- export const DateTimeType = mod.DateTimeType;
58
- export const DateType = mod.DateType;
59
- export const DeadlockException = mod.DeadlockException;
60
- export const DecimalType = mod.DecimalType;
61
- export const DefaultLogger = mod.DefaultLogger;
62
- export const DeferMode = mod.DeferMode;
63
- export const DoubleType = mod.DoubleType;
64
- export const DriverException = mod.DriverException;
65
- export const EagerProps = mod.EagerProps;
66
- export const Embeddable = mod.Embeddable;
67
- export const Embedded = mod.Embedded;
68
- export const EnsureRequestContext = mod.EnsureRequestContext;
69
- export const Entity = mod.Entity;
70
- export const EntityAssigner = mod.EntityAssigner;
71
- export const EntityCaseNamingStrategy = mod.EntityCaseNamingStrategy;
72
- export const EntityComparator = mod.EntityComparator;
73
- export const EntityFactory = mod.EntityFactory;
74
- export const EntityHelper = mod.EntityHelper;
75
- export const EntityIdentifier = mod.EntityIdentifier;
76
- export const EntityLoader = mod.EntityLoader;
77
- export const EntityManager = mod.EntityManager;
78
- export const EntityManagerType = mod.EntityManagerType;
79
- export const EntityMetadata = mod.EntityMetadata;
80
- export const EntityRepository = mod.EntityRepository;
81
- export const EntityRepositoryType = mod.EntityRepositoryType;
82
- export const EntitySchema = mod.EntitySchema;
83
- export const EntitySerializer = mod.EntitySerializer;
84
- export const EntityTransformer = mod.EntityTransformer;
85
- export const EntityValidator = mod.EntityValidator;
86
- export const Enum = mod.Enum;
87
- export const EnumArrayType = mod.EnumArrayType;
88
- export const EnumType = mod.EnumType;
89
- export const EventManager = mod.EventManager;
90
- export const EventType = mod.EventType;
91
- export const EventTypeMap = mod.EventTypeMap;
92
- export const ExceptionConverter = mod.ExceptionConverter;
93
- export const FileCacheAdapter = mod.FileCacheAdapter;
94
- export const Filter = mod.Filter;
95
- export const FloatType = mod.FloatType;
96
- export const FlushMode = mod.FlushMode;
97
- export const ForeignKeyConstraintViolationException = mod.ForeignKeyConstraintViolationException;
98
- export const Formula = mod.Formula;
99
- export const FullTextType = mod.FullTextType;
100
- export const GeneratedCacheAdapter = mod.GeneratedCacheAdapter;
101
- export const GroupOperator = mod.GroupOperator;
102
- export const HiddenProps = mod.HiddenProps;
103
- export const Hydrator = mod.Hydrator;
104
- export const IdentityMap = mod.IdentityMap;
105
- export const Index = mod.Index;
106
- export const IntegerType = mod.IntegerType;
107
- export const IntervalType = mod.IntervalType;
108
- export const InvalidFieldNameException = mod.InvalidFieldNameException;
109
- export const IsolationLevel = mod.IsolationLevel;
110
- export const JSON_KEY_OPERATORS = mod.JSON_KEY_OPERATORS;
111
- export const JoinType = mod.JoinType;
112
- export const JsonProperty = mod.JsonProperty;
113
- export const JsonType = mod.JsonType;
114
- export const Kysely = mod.Kysely;
115
- export const LoadStrategy = mod.LoadStrategy;
116
- export const LockMode = mod.LockMode;
117
- export const LockWaitTimeoutException = mod.LockWaitTimeoutException;
118
- export const ManyToMany = mod.ManyToMany;
119
- export const ManyToOne = mod.ManyToOne;
120
- export const MediumIntType = mod.MediumIntType;
121
- export const MemoryCacheAdapter = mod.MemoryCacheAdapter;
122
- export const MetadataDiscovery = mod.MetadataDiscovery;
123
- export const MetadataError = mod.MetadataError;
124
- export const MetadataProvider = mod.MetadataProvider;
125
- export const MetadataStorage = mod.MetadataStorage;
126
- export const MetadataValidator = mod.MetadataValidator;
127
- export const MikroORM = mod.MikroORM;
128
- export const MongoNamingStrategy = mod.MongoNamingStrategy;
129
- export const MsSqlNativeQueryBuilder = mod.MsSqlNativeQueryBuilder;
130
- export const MySqlExceptionConverter = mod.MySqlExceptionConverter;
131
- export const MySqlNativeQueryBuilder = mod.MySqlNativeQueryBuilder;
132
- export const MySqlPlatform = mod.MySqlPlatform;
133
- export const MySqlSchemaHelper = mod.MySqlSchemaHelper;
134
- export const NativeQueryBuilder = mod.NativeQueryBuilder;
135
- export const NodeState = mod.NodeState;
136
- export const NonUniqueFieldNameException = mod.NonUniqueFieldNameException;
137
- export const NotFoundError = mod.NotFoundError;
138
- export const NotNullConstraintViolationException = mod.NotNullConstraintViolationException;
139
- export const NullCacheAdapter = mod.NullCacheAdapter;
140
- export const NullHighlighter = mod.NullHighlighter;
141
- export const ObjectBindingPattern = mod.ObjectBindingPattern;
142
- export const ObjectCriteriaNode = mod.ObjectCriteriaNode;
143
- export const ObjectHydrator = mod.ObjectHydrator;
144
- export const OnInit = mod.OnInit;
145
- export const OnLoad = mod.OnLoad;
146
- export const OneToMany = mod.OneToMany;
147
- export const OneToOne = mod.OneToOne;
148
- export const OptimisticLockError = mod.OptimisticLockError;
149
- export const OptionalProps = mod.OptionalProps;
150
- export const PlainObject = mod.PlainObject;
151
- export const Platform = mod.Platform;
152
- export const PopulateHint = mod.PopulateHint;
153
- export const PopulatePath = mod.PopulatePath;
154
- export const PostgreSqlConnection = mod.PostgreSqlConnection;
155
- export const PostgreSqlDriver = mod.PostgreSqlDriver;
156
- export const PostgreSqlExceptionConverter = mod.PostgreSqlExceptionConverter;
157
- export const PostgreSqlNativeQueryBuilder = mod.PostgreSqlNativeQueryBuilder;
158
- export const PostgreSqlPlatform = mod.PostgreSqlPlatform;
159
- export const PostgreSqlSchemaHelper = mod.PostgreSqlSchemaHelper;
160
- export const PrimaryKey = mod.PrimaryKey;
161
- export const PrimaryKeyProp = mod.PrimaryKeyProp;
162
- export const Property = mod.Property;
163
- export const QueryBuilder = mod.QueryBuilder;
164
- export const QueryBuilderHelper = mod.QueryBuilderHelper;
165
- export const QueryFlag = mod.QueryFlag;
166
- export const QueryHelper = mod.QueryHelper;
167
- export const QueryOperator = mod.QueryOperator;
168
- export const QueryOrder = mod.QueryOrder;
169
- export const QueryOrderNumeric = mod.QueryOrderNumeric;
170
- export const QueryType = mod.QueryType;
171
- export const Raw = mod.Raw;
172
- export const RawQueryFragment = mod.RawQueryFragment;
173
- export const ReadOnlyException = mod.ReadOnlyException;
174
- export const Ref = mod.Ref;
175
- export const Reference = mod.Reference;
176
- export const ReferenceKind = mod.ReferenceKind;
177
- export const ReflectMetadataProvider = mod.ReflectMetadataProvider;
178
- export const RequestContext = mod.RequestContext;
179
- export const SCALAR_TYPES = mod.SCALAR_TYPES;
180
- export const ScalarCriteriaNode = mod.ScalarCriteriaNode;
181
- export const ScalarReference = mod.ScalarReference;
182
- export const SchemaComparator = mod.SchemaComparator;
183
- export const SchemaGenerator = mod.SchemaGenerator;
184
- export const SchemaHelper = mod.SchemaHelper;
185
- export const SerializationContext = mod.SerializationContext;
186
- export const SerializedPrimaryKey = mod.SerializedPrimaryKey;
187
- export const ServerException = mod.ServerException;
188
- export const SimpleLogger = mod.SimpleLogger;
189
- export const SmallIntType = mod.SmallIntType;
190
- export const SqlEntityManager = mod.SqlEntityManager;
191
- export const SqlEntityRepository = mod.SqlEntityRepository;
192
- export const SqlSchemaGenerator = mod.SqlSchemaGenerator;
193
- export const SqliteExceptionConverter = mod.SqliteExceptionConverter;
194
- export const SqliteNativeQueryBuilder = mod.SqliteNativeQueryBuilder;
195
- export const SqliteSchemaHelper = mod.SqliteSchemaHelper;
196
- export const StringType = mod.StringType;
197
- export const SyntaxErrorException = mod.SyntaxErrorException;
198
- export const TableExistsException = mod.TableExistsException;
199
- export const TableNotFoundException = mod.TableNotFoundException;
200
- export const TextType = mod.TextType;
201
- export const TimeType = mod.TimeType;
202
- export const TinyIntType = mod.TinyIntType;
203
- export const TransactionContext = mod.TransactionContext;
204
- export const TransactionEventBroadcaster = mod.TransactionEventBroadcaster;
205
- export const Transactional = mod.Transactional;
206
- export const Type = mod.Type;
207
- export const Uint8ArrayType = mod.Uint8ArrayType;
208
- export const UnderscoreNamingStrategy = mod.UnderscoreNamingStrategy;
209
- export const Unique = mod.Unique;
210
- export const UniqueConstraintViolationException = mod.UniqueConstraintViolationException;
211
- export const UnitOfWork = mod.UnitOfWork;
212
- export const UnknownType = mod.UnknownType;
213
- export const Utils = mod.Utils;
214
- export const UuidType = mod.UuidType;
215
- export const ValidationError = mod.ValidationError;
216
- export const WrappedEntity = mod.WrappedEntity;
217
- export const assign = mod.assign;
218
- export const colors = mod.colors;
219
- export const compareArrays = mod.compareArrays;
220
- export const compareBooleans = mod.compareBooleans;
221
- export const compareBuffers = mod.compareBuffers;
222
- export const compareObjects = mod.compareObjects;
223
- export const createSqlFunction = mod.createSqlFunction;
224
- export const defineConfig = mod.defineConfig;
225
- export const equals = mod.equals;
226
- export const getOnConflictFields = mod.getOnConflictFields;
227
- export const getOnConflictReturningFields = mod.getOnConflictReturningFields;
228
- export const helper = mod.helper;
229
- export const isRaw = mod.isRaw;
230
- export const parseJsonSafe = mod.parseJsonSafe;
231
- export const raw = mod.raw;
232
- export const ref = mod.ref;
233
- export const rel = mod.rel;
234
- export const serialize = mod.serialize;
235
- export const sql = mod.sql;
236
- export const t = mod.t;
237
- export const types = mod.types;
238
- export const wrap = mod.wrap;