MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / set

Method set

src/sql/src/session/vars.rs:277–290  ·  view source on GitHub ↗

Parse the input and update the stored value to match.

(&mut self, input: VarInput, local: bool)

Source from the content-addressed store, hash-verified

275
276 /// Parse the input and update the stored value to match.
277 pub fn set(&mut self, input: VarInput, local: bool) -> Result<(), VarError> {
278 let v = self.definition.parse(input)?;
279
280 // Validate our parsed value.
281 self.validate_constraints(v.as_ref())?;
282
283 if local {
284 self.local_value = Some(v);
285 } else {
286 self.local_value = None;
287 self.staged_value = Some(v);
288 }
289 Ok(())
290 }
291
292 /// Sets the default value for the variable.
293 pub fn set_default(&mut self, input: VarInput) -> Result<(), VarError> {

Callers 3

set_clusterMethod · 0.45

Calls 11

compat_translateFunction · 0.85
validate_constraintsMethod · 0.80
check_read_onlyMethod · 0.80
notify_callbacksMethod · 0.80
parseMethod · 0.45
as_refMethod · 0.45
mapMethod · 0.45
get_mutMethod · 0.45
visibleMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected