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

Function resolve

crates/expr/src/rls.rs:554–557  ·  view source on GitHub ↗

Parse, type check, and resolve RLS rules

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

Source from the content-addressed store, hash-verified

552
553 /// Parse, type check, and resolve RLS rules
554 fn resolve(sql: &str, tx: &impl SchemaView, auth: &AuthCtx) -> anyhow::Result<Vec<ProjectName>> {
555 let (expr, _) = parse_and_type_sub(sql, tx, auth)?;
556 resolve_views_for_sub(tx, expr, auth, &mut false)
557 }
558
559 #[test]
560 fn test_rls_for_owner() -> anyhow::Result<()> {

Callers 15

connectPgClientFunction · 0.85
connectStdbFunction · 0.85
people.get.tsFile · 0.85
checkServiceFunction · 0.85
runPrepFunction · 0.85
cli.tsFile · 0.85
shFunction · 0.85
fetchPeopleFunction · 0.85
fetchPeopleFunction · 0.85
fetchPeopleFunction · 0.85
fetchPeopleFunction · 0.85
runCargoAndAppendFunction · 0.85

Calls 2

resolve_views_for_subFunction · 0.85
parse_and_type_subFunction · 0.70

Tested by 3

test_rls_for_ownerFunction · 0.68
test_rls_for_non_ownerFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…