@@ -140,28 +140,25 @@ impl<'q, DB: Database> Execute<'q, DB> for RawSql<'q> {
140
140
impl < ' q > RawSql < ' q > {
141
141
/// Execute the SQL string and return the total number of rows affected.
142
142
#[ inline]
143
- pub async fn execute < ' e , ' c : ' e , E , DB > (
144
- self ,
145
- executor : E ,
146
- ) -> crate :: Result < DB :: QueryResult >
143
+ pub async fn execute < ' e , E , DB > ( self , executor : E ) -> crate :: Result < DB :: QueryResult >
147
144
where
148
145
' q : ' e ,
149
146
DB : Database ,
150
- E : Executor < ' c , Database = DB > ,
147
+ E : Executor < ' e , Database = DB > ,
151
148
{
152
149
executor. execute ( self ) . await
153
150
}
154
151
155
152
/// Execute the SQL string. Returns a stream which gives the number of rows affected for each statement in the string.
156
153
#[ inline]
157
- pub fn execute_many < ' e , ' c : ' e , E , DB > (
154
+ pub fn execute_many < ' e , E , DB > (
158
155
self ,
159
156
executor : E ,
160
157
) -> BoxStream < ' e , crate :: Result < DB :: QueryResult > >
161
158
where
162
159
' q : ' e ,
163
160
DB : Database ,
164
- E : Executor < ' c , Database = DB > ,
161
+ E : Executor < ' e , Database = DB > ,
165
162
{
166
163
executor. execute_many ( self )
167
164
}
@@ -170,14 +167,11 @@ impl<'q> RawSql<'q> {
170
167
///
171
168
/// If the string contains multiple statements, their results will be concatenated together.
172
169
#[ inline]
173
- pub fn fetch < ' e , ' c : ' e , E , DB > (
174
- self ,
175
- executor : E ,
176
- ) -> BoxStream < ' e , Result < DB :: Row , Error > >
170
+ pub fn fetch < ' e , E , DB > ( self , executor : E ) -> BoxStream < ' e , Result < DB :: Row , Error > >
177
171
where
178
172
' q : ' e ,
179
173
DB : Database ,
180
- E : Executor < ' c , Database = DB > ,
174
+ E : Executor < ' e , Database = DB > ,
181
175
{
182
176
executor. fetch ( self )
183
177
}
@@ -187,20 +181,14 @@ impl<'q> RawSql<'q> {
187
181
/// For each query in the stream, any generated rows are returned first,
188
182
/// then the `QueryResult` with the number of rows affected.
189
183
#[ inline]
190
- pub fn fetch_many < ' e , ' c : ' e , E , DB > (
184
+ pub fn fetch_many < ' e , E , DB > (
191
185
self ,
192
186
executor : E ,
193
- ) -> BoxStream <
194
- ' e ,
195
- Result <
196
- Either < DB :: QueryResult , DB :: Row > ,
197
- Error ,
198
- > ,
199
- >
187
+ ) -> BoxStream < ' e , Result < Either < DB :: QueryResult , DB :: Row > , Error > >
200
188
where
201
189
' q : ' e ,
202
190
DB : Database ,
203
- E : Executor < ' c , Database = DB > ,
191
+ E : Executor < ' e , Database = DB > ,
204
192
{
205
193
executor. fetch_many ( self )
206
194
}
@@ -213,14 +201,11 @@ impl<'q> RawSql<'q> {
213
201
/// To avoid exhausting available memory, ensure the result set has a known upper bound,
214
202
/// e.g. using `LIMIT`.
215
203
#[ inline]
216
- pub fn fetch_all < ' e , ' c : ' e , E , DB > (
217
- self ,
218
- executor : E ,
219
- ) -> BoxFuture < ' e , crate :: Result < Vec < DB :: Row > > >
204
+ pub fn fetch_all < ' e , E , DB > ( self , executor : E ) -> BoxFuture < ' e , crate :: Result < Vec < DB :: Row > > >
220
205
where
221
206
' q : ' e ,
222
207
DB : Database ,
223
- E : Executor < ' c , Database = DB > ,
208
+ E : Executor < ' e , Database = DB > ,
224
209
{
225
210
executor. fetch_all ( self )
226
211
}
@@ -238,14 +223,11 @@ impl<'q> RawSql<'q> {
238
223
///
239
224
/// Otherwise, you might want to add `LIMIT 1` to your query.
240
225
#[ inline]
241
- pub fn fetch_one < ' e , ' c : ' e , E , DB > (
242
- self ,
243
- executor : E ,
244
- ) -> BoxFuture < ' e , crate :: Result < DB :: Row > >
226
+ pub fn fetch_one < ' e , E , DB > ( self , executor : E ) -> BoxFuture < ' e , crate :: Result < DB :: Row > >
245
227
where
246
228
' q : ' e ,
247
229
DB : Database ,
248
- E : Executor < ' c , Database = DB > ,
230
+ E : Executor < ' e , Database = DB > ,
249
231
{
250
232
executor. fetch_one ( self )
251
233
}
@@ -263,14 +245,11 @@ impl<'q> RawSql<'q> {
263
245
///
264
246
/// Otherwise, you might want to add `LIMIT 1` to your query.
265
247
#[ inline]
266
- pub async fn fetch_optional < ' e , ' c : ' e , E , DB > (
267
- self ,
268
- executor : E ,
269
- ) -> crate :: Result < DB :: Row >
248
+ pub async fn fetch_optional < ' e , E , DB > ( self , executor : E ) -> crate :: Result < DB :: Row >
270
249
where
271
250
' q : ' e ,
272
251
DB : Database ,
273
- E : Executor < ' c , Database = DB > ,
252
+ E : Executor < ' e , Database = DB > ,
274
253
{
275
254
executor. fetch_one ( self ) . await
276
255
}
0 commit comments