chore(mysql): make Row::is_null public

This commit is contained in:
Ryan Leckey 2021-03-27 15:04:09 -07:00
parent 858212f755
commit ee8f5b7c14
2 changed files with 2 additions and 2 deletions

View File

@ -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)
}

View File

@ -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)
}