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

Method module_def

crates/cli/src/api.rs:64–73  ·  view source on GitHub ↗

Reads the `ModuleDef` from the `schema` endpoint.

(&self)

Source from the content-addressed store, hash-verified

62
63 /// Reads the `ModuleDef` from the `schema` endpoint.
64 pub async fn module_def(&self) -> anyhow::Result<RawModuleDefV9> {
65 let res = self
66 .client
67 .get(self.con.db_uri("schema"))
68 .query(&[("version", "9")])
69 .send()
70 .await?;
71 let DeserializeWrapper(module_def) = res.json_or_error().await?;
72 Ok(module_def)
73 }
74
75 pub async fn call(&self, reducer_name: &str, arg_json: String) -> anyhow::Result<reqwest::Response> {
76 Ok(self

Callers 3

execFunction · 0.45
execFunction · 0.45
execFunction · 0.45

Calls 6

queryMethod · 0.80
db_uriMethod · 0.80
json_or_errorMethod · 0.80
sendMethod · 0.65
OkFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected