| 4671 | } |
| 4672 | |
| 4673 | #extractProperty(value: unknown, property: string): unknown { |
| 4674 | // Property access on null returns null (per Cypher semantics) |
| 4675 | if (value === null) { |
| 4676 | return null; |
| 4677 | } |
| 4678 | // Handle Vertex and Edge objects |
| 4679 | if (value instanceof Vertex || value instanceof Edge) { |
| 4680 | // Special properties |
| 4681 | if (property === "@id") return value.id; |
| 4682 | if (property === "@label") return value.label; |
| 4683 | // Regular properties - use .get() method |
| 4684 | return value.get(property); |
| 4685 | } |
| 4686 | // Handle plain objects |
| 4687 | if (typeof value === "object") { |
| 4688 | return (value as Record<string, unknown>)[property]; |
| 4689 | } |
| 4690 | return undefined; |
| 4691 | } |
| 4692 | |
| 4693 | public override clone(partial?: Partial<PropertyValuesStepConfig>) { |
| 4694 | return new PropertyValuesStep({ |