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

Function SPACETIMEDB_REDUCER

modules/module-test-cpp/src/lib.cpp:244–250  ·  view source on GitHub ↗

Repeating test reducer for scheduled operations

Source from the content-addressed store, hash-verified

242
243// Repeating test reducer for scheduled operations
244SPACETIMEDB_REDUCER(repeating_test, ReducerContext ctx, RepeatingTestArg arg) {
245 // Log would show delta time since last run
246 // In C++ we don't have log::trace equivalent yet
247 auto delta_time = ctx.timestamp.duration_since(arg.prev_time);
248 LOG_TRACE("Timestamp: " + ctx.timestamp.to_string() + " Delta time: " + delta_time.to_string());
249 return Ok();
250}
251
252// Add a person to the Person table
253SPACETIMEDB_REDUCER(add, ReducerContext ctx, std::string name, uint8_t age) {

Callers

nothing calls this directly

Calls 15

range_fromFunction · 0.85
range_toFunction · 0.85
range_inclusiveFunction · 0.85
range_to_inclusiveFunction · 0.85
delete_by_keyMethod · 0.80
sender_authMethod · 0.80
get_caller_identityMethod · 0.80
insertMethod · 0.65
filterMethod · 0.65
indexMethod · 0.65
countMethod · 0.65
OkFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…