( item: unknown, key: string | undefined, expression?: ConditionValue, context?: QueryContext, )
| 3993 | } |
| 3994 | |
| 3995 | function resolveOrderValue( |
| 3996 | item: unknown, |
| 3997 | key: string | undefined, |
| 3998 | expression?: ConditionValue, |
| 3999 | context?: QueryContext, |
| 4000 | ): unknown { |
| 4001 | if (expression !== undefined) { |
| 4002 | if (item instanceof TraversalPath) { |
| 4003 | return resolveConditionValue(item, expression, context); |
| 4004 | } |
| 4005 | return undefined; |
| 4006 | } |
| 4007 | |
| 4008 | if (key === undefined) { |
| 4009 | return item instanceof TraversalPath ? item.value : item; |
| 4010 | } |
| 4011 | |
| 4012 | if (item instanceof TraversalPath) { |
| 4013 | // First try to get the value as a bound variable (for aliases like UNWIND x) |
| 4014 | // then fall back to property access (for expressions like ORDER BY n.name) |
| 4015 | return item.get(key)?.value ?? item.property(key as never); |
| 4016 | } |
| 4017 | |
| 4018 | if (typeof item === "object" && item !== null) { |
| 4019 | return (item as Record<string, unknown>)[key]; |
| 4020 | } |
| 4021 | |
| 4022 | return undefined; |
| 4023 | } |
| 4024 | |
| 4025 | export interface UnionStepConfig extends StepConfig {} |
| 4026 |
no test coverage detected