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

Method hash

packages/sql/src/query/QueryBuilder.ts:2556–2558  ·  view source on GitHub ↗
(data: EntityData<Entity>)

Source from the content-addressed store, hash-verified

2554 const joinedProps = this.driver.joinedProps(meta, this.#state.populate);
2555 const stack = [] as EntityData<Entity>[];
2556 const hash = (data: EntityData<Entity>) => {
2557 return Utils.getPrimaryKeyHash(meta.primaryKeys.map(pk => data[pk as EntityKey]));
2558 };
2559
2560 for await (const row of res) {
2561 const mapped = this.driver.mapResult<Entity>(row as Entity, meta, this.#state.populate, this as any)!;

Callers 1

getDefaultPrimaryNameMethod · 0.45

Calls 2

getPrimaryKeyHashMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected