mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-10-02 15:25:32 +00:00
Removed Send bound from arg binding (#2960)
This commit is contained in:
parent
b607251fc4
commit
e0a1f1633c
@ -18,7 +18,7 @@ impl<'q> Arguments<'q> for AnyArguments<'q> {
|
||||
|
||||
fn add<T>(&mut self, value: T)
|
||||
where
|
||||
T: 'q + Send + Encode<'q, Self::Database> + Type<Self::Database>,
|
||||
T: 'q + Encode<'q, Self::Database> + Type<Self::Database>,
|
||||
{
|
||||
let _ = value.encode(&mut self.values);
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ pub trait Arguments<'q>: Send + Sized + Default {
|
||||
/// Add the value to the end of the arguments.
|
||||
fn add<T>(&mut self, value: T)
|
||||
where
|
||||
T: 'q + Send + Encode<'q, Self::Database> + Type<Self::Database>;
|
||||
T: 'q + Encode<'q, Self::Database> + Type<Self::Database>;
|
||||
|
||||
fn format_placeholder<W: Write>(&self, writer: &mut W) -> fmt::Result {
|
||||
writer.write_str("?")
|
||||
|
@ -78,7 +78,7 @@ impl<'q, DB: Database> Query<'q, DB, <DB as Database>::Arguments<'q>> {
|
||||
///
|
||||
/// There is no validation that the value is of the type expected by the query. Most SQL
|
||||
/// flavors will perform type coercion (Postgres will return a database error).
|
||||
pub fn bind<T: 'q + Send + Encode<'q, DB> + Type<DB>>(mut self, value: T) -> Self {
|
||||
pub fn bind<T: 'q + Encode<'q, DB> + Type<DB>>(mut self, value: T) -> Self {
|
||||
if let Some(arguments) = &mut self.arguments {
|
||||
arguments.add(value);
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ impl<'q, DB: Database, O> QueryAs<'q, DB, O, <DB as Database>::Arguments<'q>> {
|
||||
/// Bind a value for use with this SQL query.
|
||||
///
|
||||
/// See [`Query::bind`](Query::bind).
|
||||
pub fn bind<T: 'q + Send + Encode<'q, DB> + Type<DB>>(mut self, value: T) -> Self {
|
||||
pub fn bind<T: 'q + Encode<'q, DB> + Type<DB>>(mut self, value: T) -> Self {
|
||||
self.inner = self.inner.bind(value);
|
||||
self
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ where
|
||||
/// [postgres-limit-issue]: https://github.com/launchbadge/sqlx/issues/671#issuecomment-687043510
|
||||
pub fn push_bind<T>(&mut self, value: T) -> &mut Self
|
||||
where
|
||||
T: 'args + Encode<'args, DB> + Send + Type<DB>,
|
||||
T: 'args + Encode<'args, DB> + Type<DB>,
|
||||
{
|
||||
self.sanity_check();
|
||||
|
||||
@ -569,7 +569,7 @@ where
|
||||
/// See [`QueryBuilder::push_bind()`] for details.
|
||||
pub fn push_bind<T>(&mut self, value: T) -> &mut Self
|
||||
where
|
||||
T: 'args + Encode<'args, DB> + Send + Type<DB>,
|
||||
T: 'args + Encode<'args, DB> + Type<DB>,
|
||||
{
|
||||
if self.push_separator {
|
||||
self.query_builder.push(&self.separator);
|
||||
@ -587,7 +587,7 @@ where
|
||||
/// Simply calls [`QueryBuilder::push_bind()`] directly.
|
||||
pub fn push_bind_unseparated<T>(&mut self, value: T) -> &mut Self
|
||||
where
|
||||
T: 'args + Encode<'args, DB> + Send + Type<DB>,
|
||||
T: 'args + Encode<'args, DB> + Type<DB>,
|
||||
{
|
||||
self.query_builder.push_bind(value);
|
||||
self
|
||||
|
@ -48,7 +48,7 @@ impl<'q, DB: Database, O> QueryScalar<'q, DB, O, <DB as Database>::Arguments<'q>
|
||||
/// Bind a value for use with this SQL query.
|
||||
///
|
||||
/// See [`Query::bind`](crate::query::Query::bind).
|
||||
pub fn bind<T: 'q + Send + Encode<'q, DB> + Type<DB>>(mut self, value: T) -> Self {
|
||||
pub fn bind<T: 'q + Encode<'q, DB> + Type<DB>>(mut self, value: T) -> Self {
|
||||
self.inner = self.inner.bind(value);
|
||||
self
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user