Skip to content

Commit

Permalink
correct spelling of MySqlConnectOptions::no_engine_substitution() (l…
Browse files Browse the repository at this point in the history
…aunchbadge#3421)

* Update connect.rs

* Update mod.rs

correct naming no_engine_substitution

* Update mod.rs

* Update mod.rs

* Update mod.rs

* Update mod.rs
  • Loading branch information
kolinfluence authored Aug 12, 2024
1 parent e783f9d commit fac53b0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sqlx-mysql/src/options/connect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl ConnectOptions for MySqlConnectOptions {
if self.pipes_as_concat {
sql_mode.push(r#"PIPES_AS_CONCAT"#);
}
if self.no_engine_subsitution {
if self.no_engine_substitution {
sql_mode.push(r#"NO_ENGINE_SUBSTITUTION"#);
}

Expand Down
13 changes: 9 additions & 4 deletions sqlx-mysql/src/options/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ pub struct MySqlConnectOptions {
pub(crate) log_settings: LogSettings,
pub(crate) pipes_as_concat: bool,
pub(crate) enable_cleartext_plugin: bool,
pub(crate) no_engine_subsitution: bool,
pub(crate) no_engine_substitution: bool,
pub(crate) timezone: Option<String>,
pub(crate) set_names: bool,
}
Expand Down Expand Up @@ -108,7 +108,7 @@ impl MySqlConnectOptions {
log_settings: Default::default(),
pipes_as_concat: true,
enable_cleartext_plugin: false,
no_engine_subsitution: true,
no_engine_substitution: true,
timezone: Some(String::from("+00:00")),
set_names: true,
}
Expand Down Expand Up @@ -340,6 +340,11 @@ impl MySqlConnectOptions {
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.
///
Expand All @@ -350,8 +355,8 @@ impl MySqlConnectOptions {
/// 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;
pub fn no_engine_substitution(mut self, flag_val: bool) -> Self {
self.no_engine_substitution = flag_val;
self
}

Expand Down

0 comments on commit fac53b0

Please sign in to comment.