@mikro-orm/knex 7.0.0-dev.83 → 7.0.0-dev.84
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/knex",
|
|
3
|
-
"version": "7.0.0-dev.
|
|
3
|
+
"version": "7.0.0-dev.84",
|
|
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
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -57,6 +57,6 @@
|
|
|
57
57
|
"@mikro-orm/core": "^6.6.1"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@mikro-orm/core": "7.0.0-dev.
|
|
60
|
+
"@mikro-orm/core": "7.0.0-dev.84"
|
|
61
61
|
}
|
|
62
62
|
}
|
package/query/CriteriaNode.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { inspect } from 'node:util';
|
|
2
1
|
import { type EntityKey, type EntityProperty, type MetadataStorage } from '@mikro-orm/core';
|
|
3
2
|
import type { ICriteriaNode, ICriteriaNodeProcessOptions, IQueryBuilder } from '../typings.js';
|
|
4
3
|
/**
|
|
@@ -27,6 +26,4 @@ export declare class CriteriaNode<T extends object> implements ICriteriaNode<T>
|
|
|
27
26
|
getPivotPath(path: string): string;
|
|
28
27
|
aliased(field: string, alias?: string): string;
|
|
29
28
|
isStrict(): boolean;
|
|
30
|
-
/** @ignore */
|
|
31
|
-
[inspect.custom](): string;
|
|
32
29
|
}
|
package/query/CriteriaNode.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { inspect } from '
|
|
2
|
-
import { RawQueryFragment, ReferenceKind, Utils, } from '@mikro-orm/core';
|
|
1
|
+
import { RawQueryFragment, ReferenceKind, Utils, inspect, } from '@mikro-orm/core';
|
|
3
2
|
/**
|
|
4
3
|
* Helper for working with deeply nested where/orderBy/having criteria. Uses composite pattern to build tree from the payload.
|
|
5
4
|
* Auto-joins relations and converts payload from { books: { publisher: { name: '...' } } } to { 'publisher_alias.name': '...' }
|
|
@@ -112,7 +111,7 @@ export class CriteriaNode {
|
|
|
112
111
|
return this.strict;
|
|
113
112
|
}
|
|
114
113
|
/** @ignore */
|
|
115
|
-
[inspect.custom]() {
|
|
114
|
+
[Symbol.for('nodejs.util.inspect.custom')]() {
|
|
116
115
|
const o = {};
|
|
117
116
|
['entityName', 'key', 'index', 'payload']
|
|
118
117
|
.filter(k => this[k] !== undefined)
|
package/query/QueryBuilder.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { inspect } from 'node:util';
|
|
2
1
|
import { type AnyEntity, type ConnectionType, type Dictionary, type EntityData, type EntityKey, type EntityManager, type EntityMetadata, type EntityName, type EntityProperty, type ExpandProperty, type FilterOptions, type FlushMode, type GroupOperator, type Loaded, LockMode, type LoggingOptions, type MetadataStorage, type ObjectQuery, PopulateHint, type PopulateOptions, type QBFilterQuery, type QBQueryOrderMap, QueryFlag, type QueryOrderMap, type QueryResult, RawQueryFragment, type RequiredEntityData, type Transaction } from '@mikro-orm/core';
|
|
3
2
|
import { JoinType, QueryType } from './enums.js';
|
|
4
3
|
import type { AbstractSqlDriver } from '../AbstractSqlDriver.js';
|
|
@@ -354,8 +353,6 @@ export declare class QueryBuilder<Entity extends object = AnyEntity, RootAlias e
|
|
|
354
353
|
private createQueryBuilderHelper;
|
|
355
354
|
private ensureFromClause;
|
|
356
355
|
private ensureNotFinalized;
|
|
357
|
-
/** @ignore */
|
|
358
|
-
[inspect.custom](depth?: number): string;
|
|
359
356
|
}
|
|
360
357
|
export interface RunQueryBuilder<Entity extends object> extends Omit<QueryBuilder<Entity, any, any>, 'getResult' | 'getSingleResult' | 'getResultList' | 'where'> {
|
|
361
358
|
where(cond: QBFilterQuery<Entity> | string, params?: keyof typeof GroupOperator | any[], operator?: keyof typeof GroupOperator): this;
|
package/query/QueryBuilder.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { inspect } from '
|
|
2
|
-
import { helper, isRaw, LoadStrategy, LockMode, PopulateHint, QueryFlag, QueryHelper, raw, RawQueryFragment, Reference, ReferenceKind, serialize, Utils, ValidationError, } from '@mikro-orm/core';
|
|
1
|
+
import { helper, isRaw, LoadStrategy, LockMode, PopulateHint, QueryFlag, QueryHelper, raw, RawQueryFragment, Reference, ReferenceKind, serialize, Utils, ValidationError, inspect, } from '@mikro-orm/core';
|
|
3
2
|
import { JoinType, QueryType } from './enums.js';
|
|
4
3
|
import { QueryBuilderHelper } from './QueryBuilderHelper.js';
|
|
5
4
|
import { CriteriaNodeFactory } from './CriteriaNodeFactory.js';
|
|
@@ -1529,7 +1528,7 @@ export class QueryBuilder {
|
|
|
1529
1528
|
}
|
|
1530
1529
|
/** @ignore */
|
|
1531
1530
|
/* v8 ignore next */
|
|
1532
|
-
[inspect.custom](depth = 2) {
|
|
1531
|
+
[Symbol.for('nodejs.util.inspect.custom')](depth = 2) {
|
|
1533
1532
|
const object = { ...this };
|
|
1534
1533
|
const hidden = ['metadata', 'driver', 'context', 'platform', 'type'];
|
|
1535
1534
|
Object.keys(object).filter(k => k.startsWith('_')).forEach(k => delete object[k]);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ALIAS_REPLACEMENT, ALIAS_REPLACEMENT_RE, ArrayType, isRaw, LockMode, OptimisticLockError, QueryOperator, QueryOrderNumeric, raw, RawQueryFragment, ReferenceKind, Utils, } from '@mikro-orm/core';
|
|
1
|
+
import { ALIAS_REPLACEMENT, ALIAS_REPLACEMENT_RE, ArrayType, isRaw, LockMode, OptimisticLockError, QueryOperator, QueryOrderNumeric, raw, RawQueryFragment, ReferenceKind, Utils, ValidationError, } from '@mikro-orm/core';
|
|
3
2
|
import { JoinType, QueryType } from './enums.js';
|
|
4
3
|
import { NativeQueryBuilder } from './NativeQueryBuilder.js';
|
|
5
4
|
/**
|
|
@@ -422,7 +421,7 @@ export class QueryBuilderHelper {
|
|
|
422
421
|
const op = Object.keys(QueryOperator).find(op => op in value);
|
|
423
422
|
/* v8 ignore next */
|
|
424
423
|
if (!op) {
|
|
425
|
-
throw
|
|
424
|
+
throw ValidationError.invalidQueryCondition(cond);
|
|
426
425
|
}
|
|
427
426
|
const replacement = this.getOperatorReplacement(op, value);
|
|
428
427
|
const fields = Utils.splitPrimaryKeys(key);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { inspect } from '
|
|
2
|
-
import { ArrayType, BooleanType, DateTimeType, JsonType, parseJsonSafe, Utils, } from '@mikro-orm/core';
|
|
1
|
+
import { ArrayType, BooleanType, DateTimeType, JsonType, parseJsonSafe, Utils, inspect, } from '@mikro-orm/core';
|
|
3
2
|
/**
|
|
4
3
|
* Compares two Schemas and return an instance of SchemaDifference.
|
|
5
4
|
*/
|