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

Method call_sql

crates/core/src/host/module_host.rs:2498–2517  ·  view source on GitHub ↗
(
        &self,
        db: Arc<RelationalDB>,
        sql_text: String,
        auth: AuthCtx,
        subs: Option<ModuleSubscriptions>,
        head: &mut Vec<(RawIdentifier, AlgebraicType)>,
    

Source from the content-addressed store, hash-verified

2496 }
2497
2498 pub async fn call_sql(
2499 &self,
2500 db: Arc<RelationalDB>,
2501 sql_text: String,
2502 auth: AuthCtx,
2503 subs: Option<ModuleSubscriptions>,
2504 head: &mut Vec<(RawIdentifier, AlgebraicType)>,
2505 ) -> Result<SqlResult, DBError> {
2506 let cmd = SqlCommand {
2507 db,
2508 sql_text,
2509 auth,
2510 subs,
2511 };
2512
2513 let res = self.call_sql_command(cmd).await?;
2514
2515 *head = res.head;
2516 res.result
2517 }
2518
2519 pub async fn call_procedure(
2520 &self,

Callers

nothing calls this directly

Calls 1

call_sql_commandMethod · 0.80

Tested by

no test coverage detected