Add a limit expression. Passing in None would remove the limit. ``` use sea_orm::{entity::*, query::*, tests_cfg::cake, DbBackend}; assert_eq!( cake::Entity::find() .limit(10) .build(DbBackend::MySql) .to_string(), "SELECT `cake`.`id`, `cake`.`name` FROM `cake` LIMIT 10" ); assert_eq!( cake::Entity::find() .limit(Some(10)) .limit(Some(20)) .build(DbBackend::MySql) .to_string(), "SELECT `cake`.`
(mut self, limit: T)
| 238 | /// ); |
| 239 | /// ``` |
| 240 | fn limit<T>(mut self, limit: T) -> Self |
| 241 | where |
| 242 | T: Into<Option<u64>>, |
| 243 | { |
| 244 | if let Some(limit) = limit.into() { |
| 245 | self.query().limit(limit); |
| 246 | } else { |
| 247 | self.query().reset_limit(); |
| 248 | } |
| 249 | self |
| 250 | } |
| 251 | |
| 252 | /// Add a group by column |
| 253 | /// ``` |