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

Function create_game_data

crates/core/src/sql/execute.rs:275–303  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

273 }
274
275 fn create_game_data() -> GameData {
276 let inv_ty = ProductType::from([("inventory_id", AlgebraicType::U64), ("name", AlgebraicType::String)]);
277 let inv = TestRows {
278 data: vec![product!(1u64, "health")],
279 };
280
281 let player_ty = ProductType::from([("entity_id", AlgebraicType::U64), ("inventory_id", AlgebraicType::U64)]);
282 let player = TestRows {
283 data: vec![product!(100u64, 1u64), product!(200u64, 1u64), product!(300u64, 1u64)],
284 };
285
286 let location_ty = ProductType::from([
287 ("entity_id", AlgebraicType::U64),
288 ("x", AlgebraicType::F32),
289 ("z", AlgebraicType::F32),
290 ]);
291 let location = TestRows {
292 data: vec![product!(100u64, 0.0f32, 32.0f32), product!(100u64, 1.0f32, 31.0f32)],
293 };
294
295 GameData {
296 location,
297 inv,
298 player,
299 location_ty,
300 inv_ty,
301 player_ty,
302 }
303 }
304
305 fn create_table_with_rows(
306 db: &RelationalDB,

Callers 1

test_inner_joinFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_inner_joinFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…