|
1 | | -//! `ExecutionProfile` is a grouping of configurable options regarding query execution. |
| 1 | +//! `ExecutionProfile` is a grouping of configurable options regarding CQL statement execution. |
2 | 2 | //! |
3 | 3 | //! Profiles can be created to represent different workloads, which thanks to them |
4 | 4 | //! can be run conveniently on a single session. |
|
38 | 38 | //! ``` |
39 | 39 | //! |
40 | 40 | //! ### Example |
41 | | -//! To create an `ExecutionProfile` and attach it to a `Query`: |
| 41 | +//! To create an [`ExecutionProfile`] and attach it to a [`Statement`](crate::statement::Statement): |
42 | 42 | //! ``` |
43 | 43 | //! # extern crate scylla; |
44 | 44 | //! # use std::error::Error; |
|
82 | 82 | //! let profile = base_profile.to_builder() |
83 | 83 | //! .consistency(Consistency::All) |
84 | 84 | //! .build(); |
85 | | -// |
| 85 | +//! |
86 | 86 | //! # Ok(()) |
87 | 87 | //! # } |
88 | 88 | //! ``` |
@@ -259,16 +259,16 @@ impl ExecutionProfileBuilder { |
259 | 259 | self |
260 | 260 | } |
261 | 261 |
|
262 | | - /// Specify a default consistency to be used for queries. |
| 262 | + /// Specify a default consistency to be used for statement executions. |
263 | 263 | /// It's possible to override it by explicitly setting a consistency on the chosen query. |
264 | 264 | pub fn consistency(mut self, consistency: Consistency) -> Self { |
265 | 265 | self.consistency = Some(consistency); |
266 | 266 | self |
267 | 267 | } |
268 | 268 |
|
269 | | - /// Specify a default serial consistency to be used for queries. |
| 269 | + /// Specify a default serial consistency to be used for statement executions. |
270 | 270 | /// It's possible to override it by explicitly setting a serial consistency |
271 | | - /// on the chosen query. |
| 271 | + /// on the chosen statement. |
272 | 272 | pub fn serial_consistency(mut self, serial_consistency: Option<SerialConsistency>) -> Self { |
273 | 273 | self.serial_consistency = Some(serial_consistency); |
274 | 274 | self |
@@ -297,7 +297,7 @@ impl ExecutionProfileBuilder { |
297 | 297 | self |
298 | 298 | } |
299 | 299 |
|
300 | | - /// Sets the [`RetryPolicy`] to use by default on queries. |
| 300 | + /// Sets the [`RetryPolicy`] to use by default on statements. |
301 | 301 | /// The default is [DefaultRetryPolicy](crate::policies::retry::DefaultRetryPolicy). |
302 | 302 | /// It is possible to implement a custom retry policy by implementing the trait [`RetryPolicy`]. |
303 | 303 | /// |
@@ -390,11 +390,11 @@ impl Default for ExecutionProfileBuilder { |
390 | 390 | } |
391 | 391 | } |
392 | 392 |
|
393 | | -/// A profile that groups configurable options regarding query execution. |
| 393 | +/// A profile that groups configurable options regarding statement execution. |
394 | 394 | /// |
395 | 395 | /// Execution profile is immutable as such, but the driver implements double indirection of form: |
396 | | -/// query/Session -> ExecutionProfileHandle -> ExecutionProfile |
397 | | -/// which enables on-fly changing the actual profile associated with all entities (query/Session) |
| 396 | +/// statement/Session -> [`ExecutionProfileHandle`] -> [`ExecutionProfile`] |
| 397 | +/// which enables on-fly changing the actual profile associated with all entities (statements/Session) |
398 | 398 | /// by the same handle. |
399 | 399 | #[derive(Debug, Clone)] |
400 | 400 | pub struct ExecutionProfile(pub(crate) Arc<ExecutionProfileInner>); |
@@ -493,7 +493,7 @@ impl ExecutionProfile { |
493 | 493 |
|
494 | 494 | /// A handle that points to an ExecutionProfile. |
495 | 495 | /// |
496 | | -/// Its goal is to enable remapping all associated entities (query/Session) |
| 496 | +/// Its goal is to enable remapping all associated entities (statement/Session) |
497 | 497 | /// to another execution profile at once. |
498 | 498 | /// Note: Cloned handles initially point to the same Arc'ed execution profile. |
499 | 499 | /// However, as the mapping has yet another level of indirection - through |
@@ -521,7 +521,7 @@ impl ExecutionProfileHandle { |
521 | 521 | } |
522 | 522 |
|
523 | 523 | /// Makes the handle point to a new execution profile. |
524 | | - /// All entities (queries/Session) holding this handle will reflect the change. |
| 524 | + /// All entities (statements/Session) holding this handle will reflect the change. |
525 | 525 | pub fn map_to_another_profile(&mut self, profile: ExecutionProfile) { |
526 | 526 | self.0 .0.store(profile.0) |
527 | 527 | } |
|
0 commit comments