limbo/cli
Preston Thorpe 82fe508609
Merge 'add metrics and implement the .stats command' from Glauber Costa
This adds basic statement and connection metrics like SQLite (and
libSQL) have.
This is particularly useful to show that materialized views are working:
turso> create table t(a);
turso> insert into t(a) values (1) , (2), (3), (4), (5), (6), (7), (8),
(9), (10); turso> create materialized view v as select count(*) from t;
turso> .stats on
Stats display enabled.
turso> select count(*) from t;
┌───────────┐
│ count (*) │
├───────────┤
│        10 │
└───────────┘
Statement Metrics:
  Row Operations:
    Rows read:        10
    Rows written:     0
    [ ... other metrics ... ]
turso> select * from v;
┌───────────┐
│ count (*) │
├───────────┤
│        10 │
└───────────┘
Statement Metrics:
  Row Operations:
    Rows read:        1
    Rows written:     0
    [ ... other metrics ... ]

Reviewed-by: Preston Thorpe <preston@turso.tech>

Closes #2651
2025-08-18 20:26:48 -04:00
..
commands add metrics and implement the .stats command 2025-08-18 09:11:06 -05:00
config cli: fix not being able to redirect traces to a file from inline query 2025-07-16 13:55:48 +03:00
docs config docs 2025-05-17 15:51:17 -03:00
app.rs add metrics and implement the .stats command 2025-08-18 09:11:06 -05:00
build.rs adding table colors 2025-03-06 15:52:20 -03:00
Cargo.toml global allocator should not be set for library, only for executables 2025-08-07 13:41:50 -03:00
helper.rs make all run_once be run under statement or connection so that rollback is called 2025-07-07 11:51:25 -03:00
input.rs add metrics and implement the .stats command 2025-08-18 09:11:06 -05:00
main.rs global allocator should not be set for library, only for executables 2025-08-07 13:41:50 -03:00
mcp_server.rs make sure our responses are compliant with MCP 2025-08-18 08:02:30 -05:00
opcodes_dictionary.rs fix: lint warnings 2024-07-08 22:43:11 +05:30
SQL.sublime-syntax highlight candidate 2025-03-06 16:33:23 -03:00