diff --git a/src/types/to_sql.rs b/src/types/to_sql.rs index 3738217..9dfa6b9 100644 --- a/src/types/to_sql.rs +++ b/src/types/to_sql.rs @@ -28,6 +28,18 @@ impl<'a, T: Into> From for ToSqlOutput<'a> { } } +impl<'a> ToSql for ToSqlOutput<'a> { + fn to_sql(&self) -> Result { + Ok(match *self { + ToSqlOutput::Borrowed(v) => ToSqlOutput::Borrowed(v), + ToSqlOutput::Owned(ref v) => ToSqlOutput::Borrowed(ValueRef::from(v)), + + #[cfg(feature = "blob")] + ToSqlOutput::ZeroBlob(i) => ToSqlOutput::ZeroBlob(i), + }) + } +} + /// A trait for types that can be converted into SQLite values. pub trait ToSql { fn to_sql(&self) -> Result;