CLI - Fix: SQL `update` and `delete` are throwing exceptions
It seems like any update and delete query in spacetime sql will cause the CLI to throw an exception.
The updates do go through, but the CLI crashes.
This only happens in the interactive view. The queries succeed without complaint when they're provided on the command line.
This seems to be due to passing with_stats: true to run_sql. If I change it to false, we do not see this issue.
It seems to be down to the table.with line in run_sql here:
// The `tabled::count_rows` add the header as a row, so subtract it.
let row_count = print_row_count(table.count_rows().wrapping_sub(1));
table.with(tabled::settings::panel::Footer::new(row_count));
This is from the api module, which I don't have any context on.
Edit: Nope I didn't read carefully. The table is a tabled::Table.
I believe this is down to the row_count being zero.