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

Code before:
    /// ssl-mode=VERIFY_IDENTITY, an attacker can compromise a router
    /// and trick the application into divulging its credentials.
    ///
    /// It is strongly recommended to set `.ssl_mode` to `Required`,
    /// `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/>
    #[deprecated = "renamed to .no_engine_substitution()"]
    pub fn no_engine_subsitution(self, flag_val: bool) -> Self {
        self.no_engine_substitution(flag_val)
    }
    
    pub fn no_engine_substitution(mut self, flag_val: bool) -> Self {
        self.no_engine_substitution = 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
    }


Review comment (suggestion):
Now also add the documentation from above.
Currently, this would not be documented ^^
```suggestion
    /// 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_substitution(mut self, flag_val: bool) -> Self {
```

Code after:
    /// ssl-mode=VERIFY_IDENTITY, an attacker can compromise a router
    /// and trick the application into divulging its credentials.
    ///
    /// It is strongly recommended to set `.ssl_mode` to `Required`,
    /// `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
    }

    #[deprecated = "renamed to .no_engine_substitution()"]
    pub fn no_engine_subsitution(self, flag_val: bool) -> Self {
        self.no_engine_substitution(flag_val)
    }

    /// 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_substitution(mut self, flag_val: bool) -> Self {
        self.no_engine_substitution = 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
    }