0
0
mirror of https://github.com/tursodatabase/libsql.git synced 2024-11-11 11:09:25 +00:00
libsql/libsql-shell
2023-12-12 15:12:31 +05:30
..
src Add support for .load command 2023-12-12 15:12:31 +05:30
Cargo.toml fix(release): mark other packages as dist=false 2023-11-17 08:43:09 -06:00
README.md fix ci 2023-10-16 15:25:18 +02:00

libSQL shell

This project contains libSQL's new shell, implemented in Rust on top of a few industry standard crates: rusqlite, rustyline, clap, tracing, etc.

The long-term goal of this project is to:

  • Match all features of the original libSQL shell (inherited from SQLite and implemented in C),
  • Add new features on top, for instance:
    • importing and exporting additional formats (Parquet and friends);
    • accessing network resources.
  • Make contributions to libSQL as easy as possible.

Status

This project is still in early development phase, so expect missing items!

Example

$ ./libsql
libSQL version 0.2.0
Connected to a transient in-memory database.

libsql> create table test(id, v);
libsql> insert into test values(42, zeroblob(12));
libsql> insert into test values(3.14, 'hello');
libsql> insert into test values(null, null);
libsql> select id, v, length(v), hex(v) from test;
 id   | v                  | length(v) | hex(v)                   
------+--------------------+-----------+--------------------------
 42   | 0xAAAAAAAAAAAAAAAA | 12        | 000000000000000000000000 
 3.14 | hello              | 5         | 68656C6C6F               
 null | null               | null      |                          
libsql>