Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@mikro-orm/core

Package Overview
Dependencies
Maintainers
1
Versions
4086
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mikro-orm/core - npm Package Compare versions

Comparing version
7.0.0-dev.291
to
7.0.0-dev.292
+43
-0
drivers/IDatabaseDriver.d.ts

@@ -113,2 +113,18 @@ import type { ConnectionType, Constructor, EntityData, EntityMetadata, EntityProperty, FilterQuery, Primary, Dictionary, IPrimaryKey, PopulateOptions, EntityDictionary, AutoPath, ObjectQuery, FilterObject, Populate, EntityName, PopulateHintOptions, Prefixes } from '../typings.js';

populateFilter?: ObjectQuery<Entity>;
/**
* Index-friendly alternative to `$or` for conditions that span joined relations.
* Each array element becomes an independent branch combined via `UNION ALL` subquery:
* `WHERE pk IN (branch_1 UNION ALL branch_2 ... branch_N)`.
* The database plans each branch independently, enabling per-table index usage
* (e.g. GIN trigram indexes for fuzzy search across related entities).
* sql only
*/
unionWhere?: ObjectQuery<Entity>[];
/**
* Strategy for combining `unionWhere` branches.
* - `'union-all'` (default) — skips deduplication, faster for most use cases.
* - `'union'` — deduplicates rows between branches; useful when branch overlap is very high.
* sql only
*/
unionWhereStrategy?: 'union-all' | 'union';
/** Used for ordering of the populate queries. If not specified, the value of `options.orderBy` is used. */

@@ -203,2 +219,9 @@ populateOrderBy?: OrderDefinition<Entity>;

loggerContext?: LogContext;
/** sql only */
unionWhere?: ObjectQuery<T>[];
/** sql only */
unionWhereStrategy?: 'union-all' | 'union';
filters?: FilterOptions;
/** @internal */
em?: EntityManager;
}

@@ -228,2 +251,6 @@ export interface NativeInsertUpdateManyOptions<T> extends NativeInsertUpdateOptions<T> {

populateFilter?: ObjectQuery<T>;
/** @see FindOptions.unionWhere */
unionWhere?: ObjectQuery<T>[];
/** @see FindOptions.unionWhereStrategy */
unionWhereStrategy?: 'union-all' | 'union';
ctx?: Transaction;

@@ -251,8 +278,24 @@ connectionType?: ConnectionType;

ctx?: Transaction;
/** sql only */
unionWhere?: ObjectQuery<T>[];
/** sql only */
unionWhereStrategy?: 'union-all' | 'union';
}
export interface DeleteOptions<T> extends DriverMethodOptions {
filters?: FilterOptions;
/** sql only */
unionWhere?: ObjectQuery<T>[];
/** sql only */
unionWhereStrategy?: 'union-all' | 'union';
/** @internal */
em?: EntityManager;
}
export interface NativeDeleteOptions<T> extends DriverMethodOptions {
filters?: FilterOptions;
/** sql only */
unionWhere?: ObjectQuery<T>[];
/** sql only */
unionWhereStrategy?: 'union-all' | 'union';
/** @internal */
em?: EntityManager;
}

@@ -259,0 +302,0 @@ export interface LockOptions extends DriverMethodOptions {

+1
-0

@@ -124,2 +124,3 @@ import { type Configuration } from './utils/Configuration.js';

protected processWhere<Entity extends object, Hint extends string = never, Fields extends string = '*', Excludes extends string = never>(entityName: EntityName<Entity>, where: FilterQuery<Entity>, options: FindOptions<Entity, Hint, Fields, Excludes> | FindOneOptions<Entity, Hint, Fields, Excludes>, type: 'read' | 'update' | 'delete'): Promise<FilterQuery<Entity>>;
protected processUnionWhere<Entity extends object, Hint extends string = never>(entityName: EntityName<Entity>, options: FindOptions<Entity, Hint, any, any> | CountOptions<Entity, Hint> | UpdateOptions<Entity> | DeleteOptions<Entity>, type: 'read' | 'update' | 'delete'): Promise<void>;
protected applyDiscriminatorCondition<Entity extends object>(entityName: EntityName<Entity>, where: FilterQuery<Entity>): FilterQuery<Entity>;

@@ -126,0 +127,0 @@ protected createPopulateWhere<Entity extends object>(cond: ObjectQuery<Entity>, options: FindOptions<Entity, any, any, any> | FindOneOptions<Entity, any, any, any> | CountOptions<Entity, any>): ObjectQuery<Entity>;

+1
-1
{
"name": "@mikro-orm/core",
"type": "module",
"version": "7.0.0-dev.291",
"version": "7.0.0-dev.292",
"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,0 +6,0 @@ "exports": {

@@ -143,2 +143,3 @@ import { EntityRepository } from '../entity/EntityRepository.js';

supportsMultipleStatements(): boolean;
supportsUnionWhere(): boolean;
getArrayDeclarationSQL(): string;

@@ -145,0 +146,0 @@ marshallArray(values: string[]): string;

@@ -238,2 +238,5 @@ import { clone } from '../utils/clone.js';

}
supportsUnionWhere() {
return false;
}
getArrayDeclarationSQL() {

@@ -240,0 +243,0 @@ return 'text';

@@ -126,3 +126,3 @@ import { clone } from './clone.js';

static PK_SEPARATOR = '~~~';
static #ORM_VERSION = '7.0.0-dev.291';
static #ORM_VERSION = '7.0.0-dev.292';
/**

@@ -129,0 +129,0 @@ * Checks if the argument is instance of `Object`. Returns false for arrays.

Sorry, the diff of this file is too big to display