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

Method defaults

src/sql/src/session/vars.rs:1593–1604  ·  view source on GitHub ↗

Returns a map from each system parameter's name to its default value.

(&self)

Source from the content-addressed store, hash-verified

1591
1592 /// Returns a map from each system parameter's name to its default value.
1593 pub fn defaults(&self) -> BTreeMap<String, String> {
1594 self.vars
1595 .iter()
1596 .map(|(name, var)| {
1597 let default = var
1598 .dynamic_default
1599 .as_deref()
1600 .unwrap_or_else(|| var.definition.default_value());
1601 (name.as_str().to_owned(), default.format())
1602 })
1603 .collect()
1604 }
1605
1606 /// Registers a closure that will get called when the value for the
1607 /// specified [`VarDefinition`] changes.

Callers

nothing calls this directly

Calls 7

default_valueMethod · 0.80
collectMethod · 0.45
mapMethod · 0.45
iterMethod · 0.45
to_ownedMethod · 0.45
as_strMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected