Skip to content

Commit

Permalink
chore(raw_sql): try not adding another lifetime param
Browse files Browse the repository at this point in the history
  • Loading branch information
abonander committed Nov 28, 2024
1 parent 444d34c commit d948c07
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions sqlx-core/src/raw_sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,28 +140,28 @@ impl<'q, DB: Database> Execute<'q, DB> for RawSql<'q> {
impl<'q> RawSql<'q> {
/// Execute the SQL string and return the total number of rows affected.
#[inline]
pub async fn execute<'e, 'c: 'e, E, DB>(
pub async fn execute<'e, E, DB>(
self,
executor: E,
) -> crate::Result<DB::QueryResult>
where
'q: 'e,
DB: Database,
E: Executor<'c, Database = DB>,
E: Executor<'e, Database = DB>,
{
executor.execute(self).await
}

/// Execute the SQL string. Returns a stream which gives the number of rows affected for each statement in the string.
#[inline]
pub fn execute_many<'e, 'c: 'e, E, DB>(
pub fn execute_many<'e, E, DB>(
self,
executor: E,
) -> BoxStream<'e, crate::Result<DB::QueryResult>>
where
'q: 'e,
DB: Database,
E: Executor<'c, Database = DB>,
E: Executor<'e, Database = DB>,
{
executor.execute_many(self)
}
Expand All @@ -170,14 +170,14 @@ impl<'q> RawSql<'q> {
///
/// If the string contains multiple statements, their results will be concatenated together.
#[inline]
pub fn fetch<'e, 'c: 'e, E, DB>(
pub fn fetch<'e, E, DB>(
self,
executor: E,
) -> BoxStream<'e, Result<DB::Row, Error>>
where
'q: 'e,
DB: Database,
E: Executor<'c, Database = DB>,
E: Executor<'e, Database = DB>,
{
executor.fetch(self)
}
Expand All @@ -187,7 +187,7 @@ impl<'q> RawSql<'q> {
/// For each query in the stream, any generated rows are returned first,
/// then the `QueryResult` with the number of rows affected.
#[inline]
pub fn fetch_many<'e, 'c: 'e, E, DB>(
pub fn fetch_many<'e, E, DB>(
self,
executor: E,
) -> BoxStream<
Expand All @@ -200,7 +200,7 @@ impl<'q> RawSql<'q> {
where
'q: 'e,
DB: Database,
E: Executor<'c, Database = DB>,
E: Executor<'e, Database = DB>,
{
executor.fetch_many(self)
}
Expand All @@ -213,14 +213,14 @@ impl<'q> RawSql<'q> {
/// To avoid exhausting available memory, ensure the result set has a known upper bound,
/// e.g. using `LIMIT`.
#[inline]
pub fn fetch_all<'e, 'c: 'e, E, DB>(
pub fn fetch_all<'e, E, DB>(
self,
executor: E,
) -> BoxFuture<'e, crate::Result<Vec<DB::Row>>>
where
'q: 'e,
DB: Database,
E: Executor<'c, Database = DB>,
E: Executor<'e, Database = DB>,
{
executor.fetch_all(self)
}
Expand All @@ -238,14 +238,14 @@ impl<'q> RawSql<'q> {
///
/// Otherwise, you might want to add `LIMIT 1` to your query.
#[inline]
pub fn fetch_one<'e, 'c: 'e, E, DB>(
pub fn fetch_one<'e, E, DB>(
self,
executor: E,
) -> BoxFuture<'e, crate::Result<DB::Row>>
where
'q: 'e,
DB: Database,
E: Executor<'c, Database = DB>,
E: Executor<'e, Database = DB>,
{
executor.fetch_one(self)
}
Expand All @@ -263,14 +263,14 @@ impl<'q> RawSql<'q> {
///
/// Otherwise, you might want to add `LIMIT 1` to your query.
#[inline]
pub async fn fetch_optional<'e, 'c: 'e, E, DB>(
pub async fn fetch_optional<'e, E, DB>(
self,
executor: E,
) -> crate::Result<DB::Row>
where
'q: 'e,
DB: Database,
E: Executor<'c, Database = DB>,
E: Executor<'e, Database = DB>,
{
executor.fetch_one(self).await
}
Expand Down

0 comments on commit d948c07

Please sign in to comment.