Alter columns or table constraints. Multiples call of this method will build the SQL respecting the order of the calls ### Example ``` # #[cfg(any(feature = "postgresql", feature = "mysql"))] # { # use sql_query_builder as sql; let query = sql::AlterTable::new() .alter("COLUMN created_at SET DEFAULT now()") .to_string(); # let expected = "ALTER COLUMN created_at SET DEFAULT now()"; # assert_eq!
(mut self, alter_exp: &str)
| 416 | /// ALTER COLUMN created_at SET DEFAULT now() |
| 417 | /// ``` |
| 418 | pub fn alter(mut self, alter_exp: &str) -> Self { |
| 419 | let action = AlterTableActionItem(AlterTableOrderedAction::Alter, alter_exp.trim().to_string()); |
| 420 | push_unique(&mut self._ordered_actions, action); |
| 421 | self |
| 422 | } |
| 423 | } |
| 424 | |
| 425 | impl std::fmt::Display for AlterTable { |