@@ -34,25 +34,25 @@ pub trait Executor<'c>: Send + Debug + Sized {
34
34
type Database : Database ;
35
35
36
36
/// Execute the query and return the total number of rows affected.
37
- fn execute < ' e , ' q : ' e , E : ' q > (
37
+ fn execute < ' e , ' q : ' e , E > (
38
38
self ,
39
39
query : E ,
40
40
) -> BoxFuture < ' e , Result < <Self :: Database as Database >:: QueryResult , Error > >
41
41
where
42
42
' c : ' e ,
43
- E : Execute < ' q , Self :: Database > ,
43
+ E : ' q + Execute < ' q , Self :: Database > ,
44
44
{
45
45
self . execute_many ( query) . try_collect ( ) . boxed ( )
46
46
}
47
47
48
48
/// Execute multiple queries and return the rows affected from each query, in a stream.
49
- fn execute_many < ' e , ' q : ' e , E : ' q > (
49
+ fn execute_many < ' e , ' q : ' e , E > (
50
50
self ,
51
51
query : E ,
52
52
) -> BoxStream < ' e , Result < <Self :: Database as Database >:: QueryResult , Error > >
53
53
where
54
54
' c : ' e ,
55
- E : Execute < ' q , Self :: Database > ,
55
+ E : ' q + Execute < ' q , Self :: Database > ,
56
56
{
57
57
self . fetch_many ( query)
58
58
. try_filter_map ( |step| async move {
@@ -65,13 +65,13 @@ pub trait Executor<'c>: Send + Debug + Sized {
65
65
}
66
66
67
67
/// Execute the query and return the generated results as a stream.
68
- fn fetch < ' e , ' q : ' e , E : ' q > (
68
+ fn fetch < ' e , ' q : ' e , E > (
69
69
self ,
70
70
query : E ,
71
71
) -> BoxStream < ' e , Result < <Self :: Database as Database >:: Row , Error > >
72
72
where
73
73
' c : ' e ,
74
- E : Execute < ' q , Self :: Database > ,
74
+ E : ' q + Execute < ' q , Self :: Database > ,
75
75
{
76
76
self . fetch_many ( query)
77
77
. try_filter_map ( |step| async move {
@@ -85,7 +85,7 @@ pub trait Executor<'c>: Send + Debug + Sized {
85
85
86
86
/// Execute multiple queries and return the generated results as a stream
87
87
/// from each query, in a stream.
88
- fn fetch_many < ' e , ' q : ' e , E : ' q > (
88
+ fn fetch_many < ' e , ' q : ' e , E > (
89
89
self ,
90
90
query : E ,
91
91
) -> BoxStream <
@@ -97,28 +97,28 @@ pub trait Executor<'c>: Send + Debug + Sized {
97
97
>
98
98
where
99
99
' c : ' e ,
100
- E : Execute < ' q , Self :: Database > ;
100
+ E : ' q + Execute < ' q , Self :: Database > ;
101
101
102
102
/// Execute the query and return all the generated results, collected into a [`Vec`].
103
- fn fetch_all < ' e , ' q : ' e , E : ' q > (
103
+ fn fetch_all < ' e , ' q : ' e , E > (
104
104
self ,
105
105
query : E ,
106
106
) -> BoxFuture < ' e , Result < Vec < <Self :: Database as Database >:: Row > , Error > >
107
107
where
108
108
' c : ' e ,
109
- E : Execute < ' q , Self :: Database > ,
109
+ E : ' q + Execute < ' q , Self :: Database > ,
110
110
{
111
111
self . fetch ( query) . try_collect ( ) . boxed ( )
112
112
}
113
113
114
114
/// Execute the query and returns exactly one row.
115
- fn fetch_one < ' e , ' q : ' e , E : ' q > (
115
+ fn fetch_one < ' e , ' q : ' e , E > (
116
116
self ,
117
117
query : E ,
118
118
) -> BoxFuture < ' e , Result < <Self :: Database as Database >:: Row , Error > >
119
119
where
120
120
' c : ' e ,
121
- E : Execute < ' q , Self :: Database > ,
121
+ E : ' q + Execute < ' q , Self :: Database > ,
122
122
{
123
123
self . fetch_optional ( query)
124
124
. and_then ( |row| match row {
@@ -129,13 +129,13 @@ pub trait Executor<'c>: Send + Debug + Sized {
129
129
}
130
130
131
131
/// Execute the query and returns at most one row.
132
- fn fetch_optional < ' e , ' q : ' e , E : ' q > (
132
+ fn fetch_optional < ' e , ' q : ' e , E > (
133
133
self ,
134
134
query : E ,
135
135
) -> BoxFuture < ' e , Result < Option < <Self :: Database as Database >:: Row > , Error > >
136
136
where
137
137
' c : ' e ,
138
- E : Execute < ' q , Self :: Database > ;
138
+ E : ' q + Execute < ' q , Self :: Database > ;
139
139
140
140
/// Prepare the SQL query to inspect the type information of its parameters
141
141
/// and results.
0 commit comments