Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 65 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ name = "kite_sql"
path = "src/bin/server.rs"
required-features = ["net", "rocksdb"]

[[bin]]
name = "kitesql-shell"
path = "src/bin/shell.rs"
required-features = ["rocksdb"]

[lib]
doctest = false
crate-type = ["cdylib", "rlib"]
Expand Down Expand Up @@ -91,6 +96,7 @@ rocksdb = { version = "0.23", optional = true }
librocksdb-sys = { version = "0.17.1", optional = true }
lmdb = { version = "0.8.0", optional = true }
lmdb-sys = { version = "0.8.0", optional = true }
rustyline = { version = "14", default-features = false }

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = { version = "0.2.106" }
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,13 @@ fn main() -> Result<(), DatabaseError> {
On native targets, `LMDB` shines when reads dominate, while `RocksDB` is usually the stronger choice when writes do.
Checkpoint support and feature-gating details are documented in [docs/features.md](docs/features.md).

## Shell
- Run `cargo run --bin kitesql-shell` to open the local interactive shell.
- Use `cargo run --bin kitesql-shell -- --path ./tmp/kitesql-shell-data` to point to a custom RocksDB directory.
- Use `cargo run --bin kitesql-shell -- -e "select current_timestamp"` for a quick one-shot check.
- In interactive mode, end SQL statements with `;`; an empty line also executes the buffered statement.
- Supported metacommands include `.help`, `.quit`, `.tables`, `.views`, and `.schema <name>`.

👉**more examples**
- [hello_world](examples/hello_world.rs)
- [transaction](examples/transaction.rs)
Expand Down
30 changes: 30 additions & 0 deletions docs/features.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,34 @@
## Features
### Shell

Run the local interactive shell with:

```bash
cargo run --bin kitesql-shell
```

Use a custom data directory:

```bash
cargo run --bin kitesql-shell -- --path ./tmp/kitesql-shell-data
```

Run a one-shot SQL check:

```bash
cargo run --bin kitesql-shell -- -e "select current_timestamp"
```

In interactive mode, end SQL statements with `;`; an empty line also executes the buffered statement.

Built-in metacommands:

- `.help`
- `.quit`
- `.tables`
- `.views`
- `.schema <name>`

### PG Wire:

run `cargo run --features="net"` to start service
Expand Down
Loading
Loading