Overview
FOR loops enable you to iterate over collections and perform operations on each element. They are essential for batch processing, data transformation, and building complex graph structures.FOR loops are executed sequentially, making them ideal for operations that need to maintain order or have dependencies between iterations.
When to use FOR loops
- Batch data loading: Insert multiple nodes or edges from a collection
- Data transformation: Process and update multiple records
- Graph construction: Build relationships between collections of nodes
- Nested iterations: Create connections between all pairs of elements