-
-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small improvments #448
Small improvments #448
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ikrivosheev, nice one!
I always want to do it but haven't start loll Can we also refactor all other vec![]
? I believe most of them can be simplify to []
slice. For example:
sea-query/src/query/condition.rs
Lines 130 to 138 in c9b9c66
/// let query = Query::select() /// .column(Glyph::Image) /// .from(Glyph::Table) /// .cond_where( /// Cond::any() /// .add(Expr::tbl(Glyph::Table, Glyph::Aspect).is_in(vec![3, 4])) /// .add(Expr::tbl(Glyph::Table, Glyph::Image).like("A%")) /// ) /// .to_owned(); vec![3, 4]
can be[3, 4]
I felt like I have cleaned up some portion in 1dffb72 |
@billy1624 @tyt2y3 Done! Remove all unneeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ikrivosheev, thanks for the hard work!! :)
Thank you. This is lots of small improvements indeed. |
PR Info
Changes
OnConflict::update_value
, we can now useOnConflict::update_expr
OnConflict::update_values
, we can now useOnConflict::update_exprs
vec!
, we can use array (rust version 1.51)OrderedStatement::order_by_customs
(instead Vec<_> parameter is generic)OrderedStatement::order_by_columns
(instead Vec<_> parameter is generic)OverStatement::partition_by_customs
(instead Vec<_> parameter is generic)OverStatement::partition_by_columns
(instead Vec<_> parameter is generic)