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

Method from_sql

src/environmentd/src/test_util.rs:1383–1386  ·  view source on GitHub ↗
(ty: &Type, raw: &'a [u8])

Source from the content-addressed store, hash-verified

1381
1382impl<'a> FromSql<'a> for MzTimestamp {
1383 fn from_sql(ty: &Type, raw: &'a [u8]) -> Result<MzTimestamp, Box<dyn Error + Sync + Send>> {
1384 let n = mz_pgrepr::Numeric::from_sql(ty, raw)?;
1385 Ok(MzTimestamp(u64::try_from(n.0.0)?))
1386 }
1387
1388 fn accepts(ty: &Type) -> bool {
1389 mz_pgrepr::Numeric::accepts(ty)

Callers

nothing calls this directly

Calls 1

MzTimestampClass · 0.70

Tested by

no test coverage detected