pub fn parameter(&mut self, param: Value) {
        match self.build_mode {
            BuildMode::Standard => {
                self.params.push(param);
                if self.sql_options.contains(&SqlOption::UsesNumberedParam) {
                    let numbered_param = format!("${} ", self.params.len());
                    self.append(&numbered_param);
                } else if self.sql_options.contains(&SqlOption::UsesQuestionMark) {
                    self.append("?");
                }
            }
            BuildMode::Debug => {
                // use fmt::Display
                self.append(&format!("{}",&param));
            }
        }
    }
/// append parameter including the needed sql keywords
append parameter including the needed sql keywords
append parameter including the needed sql keywords
pub fn parameter(&mut self, param: Value) {
        match self.build_mode {
            BuildMode::Standard => {
                self.params.push(param);
                if self.sql_options.contains(&SqlOption::UsesNumberedParam) {
                    let numbered_param = format!("${} ", self.params.len());
                    self.append(&numbered_param);
                } else if self.sql_options.contains(&SqlOption::UsesQuestionMark) {
                    self.append("?");
                }
            }
            BuildMode::Debug => {
                // use fmt::Display
                self.append(&format!("{}",&param));
            }
        }
    }
pub fn parameter ( & mut self , param : Value ) { match self . build_mode { BuildMode :: Standard => { self . params . push ( param ) ; if self . sql_options . contains ( & SqlOption :: UsesNumberedParam ) { let numbered_param = format ! ( " " self params len ( ) ) ; self . append ( & numbered_param ) ; } else if self . sql_options . contains ( & SqlOption :: UsesQuestionMark ) { self . append ( " " ) ; } } BuildMode :: Debug => { // use fmt::Display self . append ( & format ! ( " " param ) ) ; } } }
append parameter including the needed sql keywords
append parameter including the needed sql keywords
&mut self
param
Value
&mut self
param
Value