Select columns ``` use sea_orm::{entity::*, query::*, tests_cfg::cake, DbBackend}; assert_eq!( cake::Entity::find() .select_only() .columns([cake::Column::Id, cake::Column::Name]) .build(DbBackend::Postgres) .to_string(), r#"SELECT "cake"."id", "cake"."name" FROM "cake""# ); ``` Conditionally select all columns expect a specific column ``` use sea_orm::{entity::*, query::*, tests_cfg::cake, Db
(mut self, cols: I)
| 153 | /// ); |
| 154 | /// ``` |
| 155 | fn columns<C, I>(mut self, cols: I) -> Self |
| 156 | where |
| 157 | C: ColumnTrait, |
| 158 | I: IntoIterator<Item = C>, |
| 159 | { |
| 160 | for col in cols.into_iter() { |
| 161 | self = self.column(col); |
| 162 | } |
| 163 | self |
| 164 | } |
| 165 | |
| 166 | /// Add an offset expression. Passing in None would remove the offset. |
| 167 | /// |