From ee8f5b7c142dd1982eaf0e9895db53cea8c22d67 Mon Sep 17 00:00:00 2001 From: Ryan Leckey Date: Sat, 27 Mar 2021 15:04:09 -0700 Subject: [PATCH] chore(mysql): make Row::is_null public --- sqlx-mysql/src/raw_value.rs | 2 +- sqlx-mysql/src/row.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sqlx-mysql/src/raw_value.rs b/sqlx-mysql/src/raw_value.rs index 3c2265e0..0c3a065b 100644 --- a/sqlx-mysql/src/raw_value.rs +++ b/sqlx-mysql/src/raw_value.rs @@ -55,7 +55,7 @@ impl<'r> MySqlRawValue<'r> { self.format } - /// Returns the underlying byte view of this value as a byte slice. + /// Returns the underlying byte view of this value. pub fn as_bytes(&self) -> DecodeResult<&'r [u8]> { self.value.map(|bytes| &**bytes).ok_or(DecodeError::UnexpectedNull) } diff --git a/sqlx-mysql/src/row.rs b/sqlx-mysql/src/row.rs index 7a8e9567..230a396f 100644 --- a/sqlx-mysql/src/row.rs +++ b/sqlx-mysql/src/row.rs @@ -19,7 +19,7 @@ impl MySqlRow { } /// Returns `true` if the row contains only `NULL` values. - fn is_null(&self) -> bool { + pub fn is_null(&self) -> bool { self.values.iter().all(Option::is_some) }