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

Function add

modules/module-test/src/lib.rs:270–280  ·  view source on GitHub ↗
(ctx: &ReducerContext, name: String, age: u8)

Source from the content-addressed store, hash-verified

268
269#[spacetimedb::reducer]
270pub fn add(ctx: &ReducerContext, name: String, age: u8) {
271 #[cfg(feature = "test-add-column")]
272 ctx.db.person().insert(Person {
273 id: 0,
274 name,
275 age,
276 edited: false,
277 });
278 #[cfg(not(feature = "test-add-column"))]
279 ctx.db.person().insert(Person { id: 0, name, age });
280}
281
282#[spacetimedb::reducer]
283pub fn say_hello(ctx: &ReducerContext) {

Callers

nothing calls this directly

Calls 2

insertMethod · 0.65
personMethod · 0.45

Tested by

no test coverage detected