Repository: launchbadge/sqlx
File: sqlx-mysql/src/options/mod.rs (Rust)

Code before:
    /// `VerifyCa`, or `VerifyIdentity` when enabling cleartext plugin.
    pub fn enable_cleartext_plugin(mut self, flag_val: bool) -> Self {
        self.enable_cleartext_plugin = flag_val;
        self
    }

    /// Flag that enables or disables the `NO_ENGINE_SUBSTITUTION` sql_mode setting after
    /// connection.
    ///
    /// If not set, if the available storage engine specified by a `CREATE TABLE` is not available,
    /// a warning is given and the default storage engine is used instead.
    ///
    /// Per default this is enabled.
    ///
    /// https://mariadb.com/kb/en/sql-mode/
    pub fn no_engine_subsitution(mut self, flag_val: bool) -> Self {
        self.no_engine_subsitution = flag_val;
        self
    }

    /// If enabled, sets `time_zone='+00:00'` after connecting with the database.
    ///
    /// Setting the time zone allows us to assume that the output from a TIMESTAMP field is UTC.
    ///
    /// Per default this is enabled.
    pub fn set_timezone_utc(mut self, flag_val: bool) -> Self {
        self.set_timezone_utc = flag_val;
        self
    }

    /// If enabled, `SET NAMES 'charset_name' COLLATE 'collation_name'` is set after connecting
    /// with the database.
    ///
    /// This ensures the connection uses the specified charset and encoding.
    ///
    /// Per default this is enabled.
    ///
    /// https://mathiasbynens.be/notes/mysql-utf8mb4
    pub fn set_names(mut self, flag_val: bool) -> Self {
        self.set_names = flag_val;
        self
    }
}

impl MySqlConnectOptions {
    /// Get the current host.
    ///
    /// # Example
    ///
    /// ```rust
    /// # use sqlx_mysql::MySqlConnectOptions;

Review comment (suggestion):
If this took a string input, it would also be useful to users who wish to set a timezone other than UTC, though that has caveats which should be made very clear:

```suggestion
    /// If `Some`, sets the `time_zone` option to the given string after connecting to the database.
    ///
    /// If `None`, no `time_zone` parameter is sent; the server timezone will be used instead.
    ///
    /// Defaults to `Some("+00:00")` to ensure all timestamps are in UTC.
    ///
    /// ### Warning
    /// Changing this setting from its default will apply an unexpected skew to any `time::OffsetDateTime` 
    /// or `chrono::DateTime<Utc>` value, whether passed as a parameter or decoded as a result.
    /// `TIMESTAMP` values are not encoded with their UTC offset in the MySQL protocol, so encoding
    /// and decoding of these types assumes the server timezone is *always* UTC.
    ///
    /// If  you are changing this option, ensure your application only uses `time::PrimitiveDateTime`
    /// or `chrono::NaiveDateTime` and that it does not assume these timestamps can be placed on a real timeline
    /// without applying the proper offset.
    pub fn timezone(mut self, value: impl Into<Option<String>>) -> Self {
```

Code after:
    /// `VerifyCa`, or `VerifyIdentity` when enabling cleartext plugin.
    pub fn enable_cleartext_plugin(mut self, flag_val: bool) -> Self {
        self.enable_cleartext_plugin = flag_val;
        self
    }

    /// Flag that enables or disables the `NO_ENGINE_SUBSTITUTION` sql_mode setting after
    /// connection.
    ///
    /// If not set, if the available storage engine specified by a `CREATE TABLE` is not available,
    /// a warning is given and the default storage engine is used instead.
    ///
    /// By default, this is `true` (`NO_ENGINE_SUBSTITUTION` is passed, forbidding engine
    /// substitution).
    ///
    /// https://mariadb.com/kb/en/sql-mode/
    pub fn no_engine_subsitution(mut self, flag_val: bool) -> Self {
        self.no_engine_subsitution = flag_val;
        self
    }

    /// If `Some`, sets the `time_zone` option to the given string after connecting to the database.
    ///
    /// If `None`, no `time_zone` parameter is sent; the server timezone will be used instead.
    ///
    /// Defaults to `Some(String::from("+00:00"))` to ensure all timestamps are in UTC.
    ///
    /// ### Warning
    /// Changing this setting from its default will apply an unexpected skew to any
    /// `time::OffsetDateTime` or `chrono::DateTime<Utc>` value, whether passed as a parameter or
    /// decoded as a result. `TIMESTAMP` values are not encoded with their UTC offset in the MySQL
    /// protocol, so encoding and decoding of these types assumes the server timezone is *always*
    /// UTC.
    ///
    /// If you are changing this option, ensure your application only uses
    /// `time::PrimitiveDateTime` or `chrono::NaiveDateTime` and that it does not assume these
    /// timestamps can be placed on a real timeline without applying the proper offset.
    pub fn timezone(mut self, value: impl Into<Option<String>>) -> Self {
        self.timezone = value.into();
        self
    }

    /// If enabled, `SET NAMES '{charset}' COLLATE '{collation}'` is passed with the values of
    /// [`.charset()`] and [`.collation()`] after connecting to the database.
    ///
    /// This ensures the connection uses the specified character set and collation.
    ///
    /// Enabled by default.
    ///
    /// ### Warning
    /// If this is disabled and the default charset is not binary-compatible with UTF-8, query