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

Method push_string

src/repr/src/row.rs:3164–3170  ·  view source on GitHub ↗

Copies `string` into the arena and returns a reference valid for its lifetime.

(&'a self, string: String)

Source from the content-addressed store, hash-verified

3162
3163 /// Copies `string` into the arena and returns a reference valid for its lifetime.
3164 pub fn push_string<'a>(&'a self, string: String) -> &'a str {
3165 let copied = self.push_bytes(string.as_bytes());
3166 unsafe {
3167 // This is safe because we just copied the bytes of a valid `String`.
3168 std::str::from_utf8_unchecked(copied)
3169 }
3170 }
3171
3172 /// Returns a growable, writeable byte buffer for assembling a value incrementally.
3173 ///

Callers 15

string_aggFunction · 0.80
acl_explodeFunction · 0.80
mz_acl_explodeFunction · 0.80
jsonb_stringifyFunction · 0.80
pretty_sqlFunction · 0.80
like_escapeFunction · 0.80
evalMethod · 0.80
evalMethod · 0.80
evalMethod · 0.80
evalMethod · 0.80
evalMethod · 0.80
evalMethod · 0.80

Calls 2

push_bytesMethod · 0.80
as_bytesMethod · 0.45

Tested by 1

test_spec_to_rowFunction · 0.64