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

Function module_def

crates/expr/src/statement.rs:493–514  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

491 use spacetimedb_sql_parser::ast::{SqlExpr, SqlLiteral};
492
493 fn module_def() -> ModuleDef {
494 build_module_def(vec![
495 (
496 "t",
497 ProductType::from([
498 ("u32", AlgebraicType::U32),
499 ("f32", AlgebraicType::F32),
500 ("str", AlgebraicType::String),
501 ("arr", AlgebraicType::array(AlgebraicType::String)),
502 ]),
503 ),
504 (
505 "s",
506 ProductType::from([
507 ("id", AlgebraicType::identity()),
508 ("u32", AlgebraicType::U32),
509 ("arr", AlgebraicType::array(AlgebraicType::String)),
510 ("bytes", AlgebraicType::bytes()),
511 ]),
512 ),
513 ])
514 }
515
516 /// A wrapper around [super::parse_and_type_sql] that takes a dummy [AuthCtx]
517 fn parse_and_type_sql(sql: &str, tx: &impl SchemaView) -> TypingResult<Statement> {

Callers 2

validFunction · 0.70
invalidFunction · 0.70

Calls 1

build_module_defFunction · 0.85

Tested by 2

validFunction · 0.56
invalidFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…