Function
add
(ctx: &ReducerContext, name: String, age: u8)
Source from the content-addressed store, hash-verified
| 268 | |
| 269 | #[spacetimedb::reducer] |
| 270 | pub 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] |
| 283 | pub fn say_hello(ctx: &ReducerContext) { |
Callers
nothing calls this directly
Tested by
no test coverage detected