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

Method modified

src/adapter/src/config/params.rs:68–85  ·  view source on GitHub ↗

Return a vector of [ModifiedParameter] instances that need to be pushed to the backend and reset this set to the empty set for future calls. The set will start growing again as soon as we modify a parameter from the `synchronized` set with a [SynchronizedParameters::modify] call.

(&mut self)

Source from the content-addressed store, hash-verified

66 /// The set will start growing again as soon as we modify a parameter from
67 /// the `synchronized` set with a [SynchronizedParameters::modify] call.
68 pub fn modified(&mut self) -> Vec<ModifiedParameter> {
69 let mut modified = BTreeSet::new();
70 std::mem::swap(&mut self.modified, &mut modified);
71 self.system_vars
72 .iter_synced()
73 .filter(move |var| modified.contains(var.name()))
74 .map(|var| {
75 let name = var.name().to_string();
76 let value = var.value();
77 let is_default = self.system_vars.is_default(&name, VarInput::Flat(&value)).expect("This will never panic because both the name and the value come from a `Var` instance");
78 ModifiedParameter {
79 name,
80 value,
81 is_default,
82 }
83 })
84 .collect()
85 }
86
87 /// Get the current in-memory value for the parameter identified by the
88 /// given `name`.

Callers 4

pushMethod · 0.80
file_metadata_signatureFunction · 0.80

Calls 10

iter_syncedMethod · 0.80
expectMethod · 0.80
collectMethod · 0.45
mapMethod · 0.45
filterMethod · 0.45
containsMethod · 0.45
nameMethod · 0.45
to_stringMethod · 0.45
valueMethod · 0.45
is_defaultMethod · 0.45

Tested by

no test coverage detected