sql_support

Function repeat_sql_vars

source
pub fn repeat_sql_vars(count: usize) -> impl Display
Expand description

Returns a value that formats as count instances of ? separated by commas.

ยงExample

assert_eq!(format!("{}", repeat_sql_vars(0)), "");
assert_eq!(format!("{}", repeat_sql_vars(1)), "?");
assert_eq!(format!("{}", repeat_sql_vars(2)), "?,?");
assert_eq!(format!("{}", repeat_sql_vars(3)), "?,?,?");