pub struct Args {
pub flavor: Flavor,
/* private fields */
}Expand description
Args 存储 SQL 相关参数。
Fields§
§flavor: Flavor默认 flavor,用于 compile。
Implementations§
Source§impl Args
impl Args
Sourcepub fn replace(&mut self, placeholder: &str, arg: impl Into<Arg>)
pub fn replace(&mut self, placeholder: &str, arg: impl Into<Arg>)
Replace:用新参数替换某个 $n 占位符对应的值(对齐 go-sqlbuilder Args.Replace)。
Sourcepub fn value(&self, placeholder: &str) -> Option<&Arg>
pub fn value(&self, placeholder: &str) -> Option<&Arg>
Value:按 $<n> 前缀解析参数值(对齐 go-sqlbuilder Args.Value 的“宽松匹配”)。
placeholder可以带后缀(如"$0xxx"),只要以$<digits>开头就会解析。
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Args
impl !RefUnwindSafe for Args
impl !Send for Args
impl !Sync for Args
impl Unpin for Args
impl !UnwindSafe for Args
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