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

Method try_from_value

src/sql/src/plan/with_options.rs:45–51  ·  view source on GitHub ↗
(v: WithOptionValue<Aug>)

Source from the content-addressed store, hash-verified

43
44impl TryFromValue<WithOptionValue<Aug>> for IcebergCatalogType {
45 fn try_from_value(v: WithOptionValue<Aug>) -> Result<Self, PlanError> {
46 match String::try_from_value(v)? {
47 s if s.eq_ignore_ascii_case("rest") => Ok(IcebergCatalogType::Rest),
48 s if s.eq_ignore_ascii_case("s3tablesrest") => Ok(IcebergCatalogType::S3TablesRest),
49 _ => sql_bail!("invalid iceberg catalog type"),
50 }
51 }
52
53 fn try_into_value(self, _catalog: &dyn SessionCatalog) -> Option<WithOptionValue<Aug>> {
54 Some(WithOptionValue::Value(Value::String(match self {

Callers

nothing calls this directly

Calls 15

UnresolvedItemNameClass · 0.85
StringClass · 0.85
plan_intervalFunction · 0.85
parse_intervalFunction · 0.85
OptionalDurationClass · 0.85
SecretClass · 0.70
ObjectClass · 0.70
lenMethod · 0.45
removeMethod · 0.45
durationMethod · 0.45
pushMethod · 0.45
into_stringMethod · 0.45

Tested by

no test coverage detected