MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / processWhere

Method processWhere

packages/core/src/EntityManager.ts:472–495  ·  view source on GitHub ↗
(
    entityName: EntityName<Entity>,
    where: FilterQuery<Entity>,
    options: FindOptions<Entity, Hint, Fields, Excludes> | FindOneOptions<Entity, Hint, Fields, Excludes>,
    type: 'read' | 'update' | 'delete',
  )

Source from the content-addressed store, hash-verified

470 }
471
472 protected async processWhere<
473 Entity extends object,
474 Hint extends string = never,
475 Fields extends string = never,
476 Excludes extends string = never,
477 >(
478 entityName: EntityName<Entity>,
479 where: FilterQuery<Entity>,
480 options: FindOptions<Entity, Hint, Fields, Excludes> | FindOneOptions<Entity, Hint, Fields, Excludes>,
481 type: 'read' | 'update' | 'delete',
482 ): Promise<FilterQuery<Entity>> {
483 where = QueryHelper.processWhere({
484 where,
485 entityName,
486 metadata: this.metadata,
487 platform: this.driver.getPlatform(),
488 convertCustomTypes: options.convertCustomTypes,
489 aliased: type === 'read',
490 });
491 where = (await this.applyFilters(entityName, where, options.filters ?? {}, type, options))!;
492 where = this.applyDiscriminatorCondition(entityName, where);
493
494 return where;
495 }
496
497 protected async processUnionWhere<Entity extends object, Hint extends string = never>(
498 entityName: EntityName<Entity>,

Callers 15

processUnionWhereMethod · 0.95
countByMethod · 0.45
countByMethod · 0.45
whereMethod · 0.45
processOrderByMethod · 0.45
joinReferenceMethod · 0.45
findMethod · 0.45
streamMethod · 0.45
applyFiltersMethod · 0.45
findOneMethod · 0.45
upsertManyMethod · 0.45
nativeUpdateMethod · 0.45

Calls 3

applyFiltersMethod · 0.95
getPlatformMethod · 0.65

Tested by

no test coverage detected