MCPcopy Create free account
hub / github.com/codemix/graph / matchesProperties

Method matchesProperties

packages/graph/src/Steps.ts:6549–6562  ·  view source on GitHub ↗
(
    element: Vertex<any, any> | Edge<any, any>,
    properties: Record<string, any>,
    context?: QueryContext,
  )

Source from the content-addressed store, hash-verified

6547 }
6548
6549 protected matchesProperties(
6550 element: Vertex<any, any> | Edge<any, any>,
6551 properties: Record<string, any>,
6552 context?: QueryContext,
6553 ): boolean {
6554 for (const [key, value] of Object.entries(properties)) {
6555 // Resolve parameter references before comparing
6556 const resolvedValue = this.resolvePropertyValue(value, context);
6557 if (element.get(key as never) !== resolvedValue) {
6558 return false;
6559 }
6560 }
6561 return true;
6562 }
6563
6564 protected resolveValue(
6565 path: TraversalPath<any, any, any>,

Callers 1

traverseMethod · 0.95

Calls 1

getMethod · 0.65

Tested by

no test coverage detected