Function update_table

Source
pub fn update_table<Sql, Arg>(sql: &mut Sql, table: &str, alias: Option<&str>)
where Sql: WriteSql<Arg>,
Expand description

Write a UPDATE <table> [ AS <alias> ] command with a table and a optional alias into the sql buffer.

§Example

let mut sql: SqlCommand<Void> = SqlCommand::default();
update_table(&mut sql, "user", Some("u"));

assert_eq!(sql.as_command(), "UPDATE user AS u");