| 4873 | } |
| 4874 | |
| 4875 | public *traverse( |
| 4876 | _source: GraphSource<any>, |
| 4877 | input: Iterable<TraversalPath<any, any, any>>, |
| 4878 | _context?: QueryContext, |
| 4879 | ): IterableIterator<TraversalPath<any, any, any>> { |
| 4880 | const { pathVariable } = this.config; |
| 4881 | |
| 4882 | for (const path of input) { |
| 4883 | this.traversed++; |
| 4884 | // Bind the entire path to the path variable |
| 4885 | // The path itself becomes the value, with the pathVariable as the label |
| 4886 | const boundPath = path.with(path, [pathVariable]); |
| 4887 | this.emitted++; |
| 4888 | yield boundPath; |
| 4889 | } |
| 4890 | } |
| 4891 | |
| 4892 | public override clone(partial?: Partial<BindPathStepConfig>) { |
| 4893 | return new BindPathStep({ |