You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently Expr::Interval is part of Expr enum. Instead, we should create its own struct because it has a lot of fields.
pubenumExpr{
...
/// INTERVAL literals, roughly in the following format:/// `INTERVAL '<value>' [ <leading_field> [ (<leading_precision>) ] ]/// [ TO <last_field> [ (<fractional_seconds_precision>) ] ]`,/// e.g. `INTERVAL '123:45.67' MINUTE(3) TO SECOND(2)`.////// The parser does not validate the `<value>`, nor does it ensure/// that the `<leading_field>` units >= the units in `<last_field>`,/// so the user will have to reject intervals like `HOUR TO YEAR`.Interval{value:Box<Expr>,leading_field:Option<DateTimeField>,leading_precision:Option<u64>,last_field:Option<DateTimeField>,/// The seconds precision can be specified in SQL source as/// `INTERVAL '__' SECOND(_, x)` (in which case the `leading_field`/// will be `Second` and the `last_field` will be `None`),/// or as `__ TO SECOND(x)`.fractional_seconds_precision:Option<u64>,},
...
}
Makes sense to me -- thank you @aprimadi -- I plan to make a new release of sqlparser sometime over the next week or so #847 -- maybe we can get this into it too
Currently Expr::Interval is part of Expr enum. Instead, we should create its own struct because it has a lot of fields.
I think it is better this way:
The text was updated successfully, but these errors were encountered: