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

Method has_field

crates/expr/src/expr.rs:313–321  ·  view source on GitHub ↗

Does this expression return this field?

(&self, field: &str)

Source from the content-addressed store, hash-verified

311
312 /// Does this expression return this field?
313 pub fn has_field(&self, field: &str) -> bool {
314 match self {
315 Self::RelVar(Relvar { alias, .. }) => alias.as_ref() == field,
316 Self::LeftDeepJoin(join) | Self::EqJoin(join, ..) => {
317 join.rhs.alias.as_ref() == field || join.lhs.has_field(field)
318 }
319 Self::Select(input, _) => input.has_field(field),
320 }
321 }
322
323 /// Return the [`TableOrViewSchema`] for a relvar in the expression
324 pub fn find_table_schema(&self, alias: &str) -> Option<&TableOrViewSchema> {

Callers 1

type_projFunction · 0.80

Calls 1

as_refMethod · 0.45

Tested by

no test coverage detected