Bulk insert position entries
| 132 | |
| 133 | // Bulk insert position entries |
| 134 | SPACETIMEDB_REDUCER(insert_bulk_position, ReducerContext& ctx, uint32_t count) { |
| 135 | for (uint32_t id = 0; id < count; ++id) { |
| 136 | float x = static_cast<float>(id); |
| 137 | float y = static_cast<float>(id + 5); |
| 138 | float z = static_cast<float>(id * 5); |
| 139 | Position new_position = { |
| 140 | id, x, y, z, |
| 141 | x + 10.0f, y + 20.0f, z + 30.0f // vx, vy, vz |
| 142 | }; |
| 143 | ctx.db[position].insert(new_position); |
| 144 | } |
| 145 | LOG_INFO("INSERT POSITION: " + std::to_string(count)); |
| 146 | return Ok(); |
| 147 | } |
| 148 | |
| 149 | // Bulk insert velocity entries |
| 150 | SPACETIMEDB_REDUCER(insert_bulk_velocity, ReducerContext& ctx, uint32_t count) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…