Skip to content

Commit b7337c6

Browse files
authored
Merge pull request #4873 from valkrypton/improve-loading-mode-docs
improve documentation of Pg loading modes
2 parents 7ea16f3 + 35099a7 commit b7337c6

File tree

1 file changed

+3
-3
lines changed
  • diesel/src/pg/connection

1 file changed

+3
-3
lines changed

diesel/src/pg/connection/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ pub(super) use self::result::PgResult;
4141
/// * [`PgRowByRowLoadingMode`]
4242
///
4343
/// If you are unsure which loading mode is the correct one for your application,
44-
/// you likely want to use the `DefaultLoadingMode` as that one offers
45-
/// generally better performance.
44+
/// you likely want to use the `DefaultLoadingMode` as it's simpler and more intuitive.
45+
/// However, if you plan to process each row on its own, you should use the `PgRowByRowLoadingMode` and
46+
/// you can also expect a performance boost.
4647
///
4748
/// Due to the fact that `PgConnection` supports multiple loading modes
4849
/// it is **required** to always specify the used loading mode
@@ -52,7 +53,6 @@ pub(super) use self::result::PgResult;
5253
///
5354
/// By using this mode `PgConnection` defaults to loading all response values at **once**
5455
/// and only performs deserialization afterward for the `DefaultLoadingMode`.
55-
/// Generally this mode will be more performant as it.
5656
///
5757
/// This loading mode allows users to perform hold more than one iterator at once using
5858
/// the same connection:

0 commit comments

Comments
 (0)