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

Method into_unquoted_value

src/sql-parser/src/ast/defs/statement.rs:4709–4717  ·  view source on GitHub ↗

Returns the underlying value without quotes.

(self)

Source from the content-addressed store, hash-verified

4707impl SetVariableValue {
4708 /// Returns the underlying value without quotes.
4709 pub fn into_unquoted_value(self) -> String {
4710 match self {
4711 // `lit.to_string` will quote a `Value::String`, so get the unquoted
4712 // version.
4713 SetVariableValue::Literal(Value::String(s)) => s,
4714 SetVariableValue::Literal(lit) => lit.to_string(),
4715 SetVariableValue::Ident(ident) => ident.into_string(),
4716 }
4717 }
4718}
4719
4720/// SQL assignment `foo = expr` as used in SQLUpdate

Callers 2

plan_set_variable_toFunction · 0.80
split_identifier_stringFunction · 0.80

Calls 2

to_stringMethod · 0.45
into_stringMethod · 0.45

Tested by

no test coverage detected