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

Method hasIn

packages/graph/src/Traversals.ts:2000–2011  ·  view source on GitHub ↗

* Filter edges which have a property value in the specified list. * @param propertyName The name of the property to filter by. * @param values The list of values to check against.

(
    propertyName: TPropertyName,
    values: readonly ResolveTraversalPathProperty<TSchema, TPath, TPropertyName>[],
  )

Source from the content-addressed store, hash-verified

1998 * @param values The list of values to check against.
1999 */
2000 public hasIn<const TPropertyName extends string>(
2001 propertyName: TPropertyName,
2002 values: readonly ResolveTraversalPathProperty<TSchema, TPath, TPropertyName>[],
2003 ): EdgeTraversal<TSchema, RefineTraversalPathValue<TSchema, TPath, TPropertyName>> {
2004 const condition: Condition = ["in", propertyName, values];
2005 return new EdgeTraversal(this.graph, [
2006 ...this.steps,
2007 new FilterElementsStep({
2008 condition,
2009 }),
2010 ]);
2011 }
2012
2013 /**
2014 * Filter edges where the specified property is null or undefined.

Callers 2

indexes.test.tsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected