shssoichiro/sqlformat-rs

Panic on overflowing integer

5225225 opened this issue · 1 comments

Reproduction code

fn main() {
    use sqlformat::*;

    format("?62666666121266666612", &QueryParams::None, FormatOptions::default());
}

Where it fails:

let index = token[1..].parse::<usize>().unwrap();

I'm trying to investigate if this is something that's even supported by the SQL spec... Either way, it shouldn't be panicking, it should either work or return a proper error.