mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-12-29 21:00:54 +00:00
chore(mysql): make Row::is_null public
This commit is contained in:
parent
858212f755
commit
ee8f5b7c14
@ -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)
|
||||
}
|
||||
|
||||
@ -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)
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user