* Convert a SetOperation (from FOREACH) into a SetStep. * Note: FOREACH SET operations currently only support individual property assignments, * not bulk property operations (n = {props} or n += {props}).
(setOp: ASTSetOperation)
| 1153 | * not bulk property operations (n = {props} or n += {props}). |
| 1154 | */ |
| 1155 | function convertSetOperationToStep(setOp: ASTSetOperation): SetStep { |
| 1156 | const assignments = setOp.assignments.map((assignment) => ({ |
| 1157 | variable: assignment.variable, |
| 1158 | property: assignment.property, |
| 1159 | value: convertSetValue(assignment.value), |
| 1160 | })); |
| 1161 | |
| 1162 | return new SetStep({ assignments }); |
| 1163 | } |
| 1164 | |
| 1165 | /** |
| 1166 | * Convert a ShortestPathPattern into a sequence of steps. |
no test coverage detected