(ctx: &ReducerContext, expected: u32)
| 169 | // ``` |
| 170 | #[spacetimedb::reducer] |
| 171 | pub fn update_position_all(ctx: &ReducerContext, expected: u32) { |
| 172 | let mut count = 0; |
| 173 | for mut position in ctx.db.position().iter() { |
| 174 | position.x += position.vx; |
| 175 | position.y += position.vy; |
| 176 | position.z += position.vz; |
| 177 | |
| 178 | let id = position.entity_id; |
| 179 | ctx.db.position().entity_id().update(position); |
| 180 | count += 1; |
| 181 | } |
| 182 | log::info!("UPDATE POSITION ALL: {expected}, processed: {count}"); |
| 183 | } |
| 184 | |
| 185 | // Simulate |
| 186 | // ``` |
no test coverage detected
searching dependent graphs…