feat: add bind_unchecked to Query and QueryAs

This commit is contained in:
Ryan Leckey 2021-02-26 00:19:30 -08:00
parent d079c021a8
commit 163d5cb1b3
No known key found for this signature in database
GPG Key ID: F8AA68C235AB08C9
2 changed files with 10 additions and 0 deletions

View File

@ -26,6 +26,11 @@ impl<'q, 'a, Db: Database, Rt: Runtime> Query<'q, 'a, Db, Rt> {
self.arguments.add(value);
self
}
pub fn bind_unchecked<T: 'a + TypeEncode<Db>>(&mut self, value: &'a T) -> &mut Self {
self.arguments.add_unchecked(value);
self
}
}
#[cfg(feature = "async")]

View File

@ -27,6 +27,11 @@ impl<'q, 'a, Db: Database, Rt: Runtime, O> QueryAs<'q, 'a, O, Db, Rt> {
self.inner.bind(value);
self
}
pub fn bind_unchecked<T: 'a + TypeEncode<Db>>(&mut self, value: &'a T) -> &mut Self {
self.inner.bind_unchecked(value);
self
}
}
#[cfg(feature = "async")]