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

Function compile_sql_stmt

crates/expr/src/statement.rs:465–472  ·  view source on GitHub ↗

Parse and type check a *general* query into a [StatementCtx].

(sql: &'a str, tx: &impl SchemaView, auth: &AuthCtx)

Source from the content-addressed store, hash-verified

463
464/// Parse and type check a *general* query into a [StatementCtx].
465pub fn compile_sql_stmt<'a>(sql: &'a str, tx: &impl SchemaView, auth: &AuthCtx) -> TypingResult<StatementCtx<'a>> {
466 let statement = parse_and_type_sql(sql, tx, auth)?;
467 Ok(StatementCtx {
468 statement,
469 sql,
470 source: StatementSource::Query,
471 })
472}
473
474#[cfg(test)]
475mod tests {

Callers

nothing calls this directly

Calls 2

parse_and_type_sqlFunction · 0.85
OkFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…