Commit Graph

34 Commits

Author SHA1 Message Date
pedrocarlo
277f6f1083 Switch to using std::io::IsTerminal::is_terminal 2025-04-21 01:03:31 -03:00
pedrocarlo
7aaffff45f Correct for Windows 2025-04-20 18:42:01 -03:00
pedrocarlo
b550fbb3e4 Only initialize Rustyline if we are in a tty 2025-04-20 17:03:43 -03:00
PThorpe92
01184ec1d7 Add tracing-appender to log traces to file asyncronously 2025-04-08 19:36:38 -04:00
pedrocarlo
fd3335908c basic autocomplete for dot commands 2025-04-04 13:01:57 -03:00
pedrocarlo
82db51b94f remove debug clap 2025-03-30 01:46:24 -03:00
pedrocarlo
fe25035c7c display name in clap is buggy 2025-03-30 01:46:24 -03:00
pedrocarlo
8c5b631baf nu_ansi_term to facilitate stylizing strings 2025-03-06 21:44:23 -03:00
pedrocarlo
e73cad387f adding table colors 2025-03-06 15:52:20 -03:00
pedrocarlo
b123321692 build script for syntax set dump 2025-03-06 15:52:20 -03:00
pedrocarlo
f631706ea4 simple highlighting for prompt 2025-03-06 15:52:20 -03:00
Pere Diaz Bou
9a01e32c01 add tracing_subscriber and test_log::test
I don't know when and why we dropped log::* in favor of tracing but when it was done, it made relevant logs not appear any more while debugging so... I added test_log::test which helps by automatically adding info logs from trace package.
2025-03-05 15:36:06 +01:00
pedrocarlo
04d7d8ab87 autocomplete working 2025-03-04 14:43:07 -03:00
pedrocarlo
99d979eb80 first version of vtable with keyword autocomplete 2025-03-04 14:43:07 -03:00
Pekka Enberg
c612b0932e bindings/rust: Rename crate to "limbo" 2025-02-12 16:49:53 +02:00
Pekka Enberg
e406a030e6 Merge 'Rework io_uring feature' from Jorge López Tello
This makes io_uring the default in CLI, but makes it non-default in
core. Before, if one built CLI without io_uring, core still built with
it as it was a default feature. To accommodate for the change, all
bindings have been updated to select the feature, except for WASM which
has a separate fs implementation.
This also adds some #[cfg] and #[allow] to silence unused-* warnings,
which I discovered when testing with different features disabled.

Closes #942
2025-02-09 08:46:29 +02:00
Jorge López
62dea0b12b cli: select io_uring feature by default 2025-02-09 01:11:00 +01:00
wyhaya
e9046fef78 cli: Improve pretty mode table 2025-02-09 00:01:07 +08:00
sonhmai
a090fb927a centralize Rust integration and regression tests 2025-01-21 15:41:09 +07:00
sonhmai
6243ffbab4 add dev dependencies for testing wal_checkpoint 2025-01-20 08:34:13 +07:00
sonhmai
66d6291f32 add scaffolding for supporting wal checkpoint 2025-01-20 08:34:13 +07:00
Jorge López
a17464ca5c cli: Add io_uring feature to match core 2025-01-11 15:03:26 +01:00
Samyak S Sarnayak
c09a0bcbf3 Nicer parse errors using miette
I noticed that the parse errors were a bit hard to read - only the nearest token and the line/col offsets were printed.

I made a first attempt at improving the errors using [miette](https://github.com/zkat/miette).
- Added derive for `miette::Diagnostic` to both the parser's error type and LimboError.
- Added miette dependency to both sqlite3_parser and core. The `fancy` feature is only enabled for CLI.

Some future improvements that can be made further:
- Add spans to AST nodes so that errors can better point to the correct token. See upstream issue: https://github.com/gwenn/lemon-rs/issues/33
- Construct more errors with offset information. I noticed that most parser errors are constructed with `None` as the offset.

Comparisons.
Before:
```
❯ cargo run --package limbo --bin limbo database.db --output-mode pretty
...
limbo> selet * from a;
[2025-01-05T11:22:55Z ERROR sqlite3Parser] near "Token([115, 101, 108, 101, 116])": syntax error
Parse error: near "selet": syntax error at (1, 6)
```

After:
```
❯ cargo run --package limbo --bin limbo database.db --output-mode pretty
...
limbo> selet * from a;
[2025-01-05T12:25:52Z ERROR sqlite3Parser] near "Token([115, 101, 108, 101, 116])": syntax error

  × near "selet": syntax error at (1, 6)
   ╭────
 1 │ selet * from a
   ·     ▲
   ·     ╰── syntax error
   ╰────

```
2025-01-05 17:56:59 +05:30
psvri
1f21cf6a71 Feat: Import csv support 2025-01-03 15:20:22 +05:30
Pekka Enberg
617f95c7b6 Update clap to 4.5
The Github dependabot complains about anstream, which comes through `clap`:

https://github.com/tursodatabase/limbo/security/dependabot/8
2024-12-11 14:39:27 +02:00
JeanArhancet
38a1b85094 fix: ctrl-c stop current query execution 2024-08-03 22:58:52 +02:00
Pekka Enberg
a6369982fe Enable cargo dist explicitly for the CLI only 2024-07-17 20:23:41 +03:00
Pekka Enberg
a0c92f6d80 Switch to workspace versioning 2024-07-17 08:39:36 +03:00
Pekka Enberg
725eed964b Tracing improvements 2024-01-14 15:36:59 +02:00
Pekka Enberg
9098744a37 Rename to Limbo 2023-09-30 15:40:35 +03:00
Pekka Enberg
3ec9c0be7c Implement ResultRow opcode 2023-09-02 11:40:11 +03:00
Pekka Enberg
f954729fd9 Tune prompt some more 2023-09-01 21:02:52 +03:00
Pekka Enberg
591e8df377 Disable tracing by default 2023-09-01 19:49:54 +03:00
Pekka Enberg
fb72f9688b Initial commit 2023-08-27 09:59:12 +03:00