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

Method opt_bool

src/testdrive/src/parser.rs:847–859  ·  view source on GitHub ↗
(&mut self, name: &str)

Source from the content-addressed store, hash-verified

845 }
846
847 pub fn opt_bool(&mut self, name: &str) -> Result<Option<bool>, anyhow::Error> {
848 self.opt_string(name)
849 .map(|val| {
850 if val == "true" {
851 Ok(true)
852 } else if val == "false" {
853 Ok(false)
854 } else {
855 bail!("bad value for boolean parameter {}: {}", name, val);
856 }
857 })
858 .transpose()
859 }
860
861 pub fn done(&self) -> Result<(), anyhow::Error> {
862 if let Some(name) = self.0.keys().next() {

Callers 9

build_contentsFunction · 0.80
run_verify_dataFunction · 0.80
run_sql_timeoutFunction · 0.80
run_executeFunction · 0.80
run_executeFunction · 0.80
run_ingestFunction · 0.80
run_verify_dataFunction · 0.80
run_verify_topicFunction · 0.80
run_queryFunction · 0.80

Calls 2

opt_stringMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected