You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Runs a READ ONLY query on the configured database using a connection from the connection pool,
184
+
/// It doesn't return any [`DetachedRowStream`] as the `run` abstraction discards any stream.
185
+
///
186
+
/// This operation retires the query on certain failures.
187
+
/// All errors with the `Transient` error class as well as a few other error classes are considered retryable.
188
+
/// This includes errors during a leader election or when the transaction resources on the server (memory, handles, ...) are exhausted.
189
+
/// Retries happen with an exponential backoff until a retry delay exceeds 60s, at which point the query fails with the last error as it would without any retry.
190
+
///
191
+
/// Use [`Graph::run`] for cases where you just want a write operation
192
+
///
193
+
/// use [`Graph::execute`] when you are interested in the result stream
self.impl_run_on(Some(db.into()), q, operation).await
183
218
}
184
219
185
220
asyncfnimpl_run_on(
@@ -205,7 +240,7 @@ impl Graph {
205
240
.await
206
241
}
207
242
208
-
/// Executes a query on the configured database and returns a [`DetachedRowStream`]
243
+
/// Executes a READ/WRITE query on the configured database and returns a [`DetachedRowStream`]
209
244
///
210
245
/// This operation retires the query on certain failures.
211
246
/// All errors with the `Transient` error class as well as a few other error classes are considered retryable.
@@ -216,17 +251,32 @@ impl Graph {
216
251
.await
217
252
}
218
253
219
-
/// Executes a query on the provided database and returns a [`DetachedRowStream`]
254
+
/// Executes a query READ on the configured database and returns a [`DetachedRowStream`]
220
255
///
221
256
/// This operation retires the query on certain failures.
222
257
/// All errors with the `Transient` error class as well as a few other error classes are considered retryable.
223
258
/// This includes errors during a leader election or when the transaction resources on the server (memory, handles, ...) are exhausted.
224
259
/// Retries happen with an exponential backoff until a retry delay exceeds 60s, at which point the query fails with the last error as it would without any retry.
/// Executes a query on the provided database and returns a [`DetachedRowStream`]
266
+
///
267
+
/// This operation retires the query on certain failures.
268
+
/// All errors with the `Transient` error class as well as a few other error classes are considered retryable.
269
+
/// This includes errors during a leader election or when the transaction resources on the server (memory, handles, ...) are exhausted.
270
+
/// Retries happen with an exponential backoff until a retry delay exceeds 60s, at which point the query fails with the last error as it would without any retry.
271
+
pubasyncfnexecute_on(
272
+
&self,
273
+
db:implInto<Database>,
274
+
q:Query,
275
+
operation:Operation,
276
+
) -> Result<DetachedRowStream>{
277
+
self.impl_execute_on(Some(db.into()), q, operation).await
0 commit comments