Resolve an `Expr::Value` into a `usize` if numeric-shaped. Thin wrapper that unpacks the `Expr` → `Value` layer so callers reading LIMIT/OFFSET clauses don't each re-write the unpack.
(expr: &ast::Expr)
| 56 | /// wrapper that unpacks the `Expr` → `Value` layer so callers reading |
| 57 | /// LIMIT/OFFSET clauses don't each re-write the unpack. |
| 58 | pub fn expr_as_usize_literal(expr: &ast::Expr) -> Option<usize> { |
| 59 | if let ast::Expr::Value(v) = expr { |
| 60 | as_usize_literal(&v.value) |
| 61 | } else { |
| 62 | None |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | /// Resolve a `Value` into an `f64` if numeric-shaped. |
| 67 | /// |
no test coverage detected