Adds columns or table constraints, this method overrides the previous value ### Example ``` # use sql_query_builder as sql; let query = sql::AlterTable::new() .add("COLUMN age int not null") .as_string(); # let expected = "ADD COLUMN age int not null"; # assert_eq!(expected, query); ``` Outputs ```sql ADD COLUMN age int not null ``` ### Available on crate feature `postgresql` and `mysql` onl
(mut self, add_exp: &str)
| 55 | /// ADD CONSTRAINT login_unique unique(login) |
| 56 | /// ``` |
| 57 | pub fn add(mut self, add_exp: &str) -> Self { |
| 58 | let action = AlterTableActionItem(AlterTableOrderedAction::Add, add_exp.trim().to_string()); |
| 59 | push_unique(&mut self._ordered_actions, action); |
| 60 | self |
| 61 | } |
| 62 | |
| 63 | /// Defines the name of the table to be altered, this method overrides the previous value |
| 64 | /// |