Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

MinuraPunchihewa
Copy link

PR Info

Bug Fixes

  • This PR enables None values to be passed for the max_connections and idle_timeout parameters when creating database connections.

@MinuraPunchihewa MinuraPunchihewa force-pushed the bugfix/allow_none_values branch from 562e47f to 353c180 Compare October 12, 2025 15:23
@MinuraPunchihewa MinuraPunchihewa changed the title Allowed None for max_connections and idle_timeout Parameters Allowed None for max_lifetime and idle_timeout Parameters Oct 12, 2025
@Huliiiiii Huliiiiii requested review from Expurple and tyt2y3 October 12, 2025 18:03
Copy link
Member

@Expurple Expurple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From quickly looking at the diff, it's not obvious why the other surrounding fields are still if let Some .... Seems like either a potential inconsistency or something that needs to be commented and maybe grouped together

@Huliiiiii
Copy link
Member

From quickly looking at the diff, it's not obvious why the other surrounding fields are still if let Some .... Seems like either a potential inconsistency or something that needs to be commented and maybe grouped together

https://github.com/launchbadge/sqlx/blob/ad2936a9c479214f90456102e218189d563f103d/sqlx-core/src/pool/options.rs#L161-L162

You are right, max_lifetime and idle_timeout should be changed to Option<Option<...>>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No way to set max_lifetime and idle_timeout to None for database connections

3 participants