MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / insert_bulk_entity

Function insert_bulk_entity

modules/benchmarks/src/circles.rs:82–89  ·  view source on GitHub ↗
(ctx: &ReducerContext, count: u32)

Source from the content-addressed store, hash-verified

80// ---------- insert bulk ----------
81#[spacetimedb::reducer]
82pub fn insert_bulk_entity(ctx: &ReducerContext, count: u32) {
83 for id in 0..count {
84 ctx.db
85 .entity()
86 .insert(Entity::new(0, id as f32, (id + 5) as f32, id * 5));
87 }
88 log::info!("INSERT ENTITY: {count}");
89}
90
91#[spacetimedb::reducer]
92pub fn insert_bulk_circle(ctx: &ReducerContext, count: u32) {

Callers 3

init_game_circlesMethod · 0.85
SPACETIMEDB_REDUCERFunction · 0.85
init_game_circlesFunction · 0.85

Calls 2

insertMethod · 0.65
newFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…