pub struct NormalizeConfig {
pub enable: bool,
pub placeholders: Vec<String>,
}Expand description
[replace_parameters] 配置段
Fields§
§enable: bool是否在导出结果中写入 normalized_sql 列(默认 true)
placeholders: Vec<String>显式声明 SQL 中使用的占位符列表,例如 ["?"] 或 [":1"]。
- 只含
"?"→ 仅匹配?顺序占位符 - 含任意
:N形式(如":1")→ 仅匹配:N序号占位符 - 空数组(默认)→ 自动检测
Implementations§
Source§impl NormalizeConfig
impl NormalizeConfig
Sourcepub fn placeholder_override(&self) -> Option<bool>
pub fn placeholder_override(&self) -> Option<bool>
将 placeholders 列表转换为 compute_normalized 所需的 placeholder_override:
None→ 自动检测Some(false)→ 强制?风格Some(true)→ 强制:N风格
Trait Implementations§
Source§impl Clone for NormalizeConfig
impl Clone for NormalizeConfig
Source§fn clone(&self) -> NormalizeConfig
fn clone(&self) -> NormalizeConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NormalizeConfig
impl Debug for NormalizeConfig
Source§impl Default for NormalizeConfig
impl Default for NormalizeConfig
Source§impl<'de> Deserialize<'de> for NormalizeConfig
impl<'de> Deserialize<'de> for NormalizeConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for NormalizeConfig
impl RefUnwindSafe for NormalizeConfig
impl Send for NormalizeConfig
impl Sync for NormalizeConfig
impl Unpin for NormalizeConfig
impl UnsafeUnpin for NormalizeConfig
impl UnwindSafe for NormalizeConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more