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

Code before:
        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;
    /// let options = MySqlConnectOptions::new()
    ///     .host("127.0.0.1");
    /// assert_eq!(options.get_host(), "127.0.0.1");
    /// ```
    pub fn get_host(&self) -> &str {
        &self.host
    }

    /// Get the server's port.
    ///
    /// # Example
    ///
    /// ```rust
    /// # use sqlx_mysql::MySqlConnectOptions;
    /// let options = MySqlConnectOptions::new()
    ///     .port(6543);

Review comment (suggestion):
```suggestion
    /// 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 strings, column names and string values will likely not decode (or encode) correctly,
    /// which may result in unexpected errors or garbage outputs at runtime.
    ///
    /// For proper functioning, you *must* ensure the server is using a binary-compatible charset,
    /// such as ASCII or Latin-1 (ISO 8859-1), and that you do not pass any strings containing
    /// codepoints not supported by said charset.
    ///
    /// Instead of disabling this, you may also consider setting [`.charset()`] to a charset
    /// that is supported by your MySQL or MariaDB server version and compatible with UTF-8.
    pub fn set_names(mut self, flag_val: bool) -> Self {
        self.set_names = flag_val;
        self
    }
```

Code after:
    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
    /// strings, column names and string values will likely not decode (or encode) correctly, which
    /// may result in unexpected errors or garbage outputs at runtime.
    ///
    /// For proper functioning, you *must* ensure the server is using a binary-compatible charset,
    /// such as ASCII or Latin-1 (ISO 8859-1), and that you do not pass any strings containing
    /// codepoints not supported by said charset.
    ///
    /// Instead of disabling this, you may also consider setting [`.charset()`] to a charset that
    /// is supported by your MySQL or MariaDB server version and compatible with UTF-8.
    pub fn set_names(mut self, flag_val: bool) -> Self {
        self.set_names = flag_val;
        self
    }
}

impl MySqlConnectOptions {