Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
e787549
fix(storage): prevent lost updates on RocksDB and drop read committed
KKould Oct 27, 2026
8da6d10
feat(tpcc): run multiple terminals with --threads
KKould Oct 27, 2026
b40e7a4
perf(execution): box every ExecNode variant
KKould Oct 29, 2026
686cc33
refactor(execution): decouple executor nodes from the transaction lif…
KKould Oct 29, 2026
387fcbb
refactor(execution): parent nodes own their children
KKould Oct 29, 2026
2c2a2d4
refactor(planner): table scans carry their row deserializers
KKould Oct 29, 2026
fa89ba4
feat(execution): reuse an executor across executions
KKould Oct 30, 2026
8906fa3
feat(db): replace PreparedPlan with a reusable Program
KKould Oct 30, 2026
384d522
refactor(db): run a program in place and drop ExecuteError
KKould Oct 30, 2026
264e3f3
refactor(dml): work out writes at bind time and follow standard UPDAT…
KKould Oct 30, 2026
1a46d4f
perf(execution): keep the execution buffers across runs
KKould Oct 31, 2026
32ffc1f
refactor(storage): prefix table keys with allocated table ids
KKould Oct 31, 2026
775a7eb
refactor(planner): resolve tables by id and keep names for display only
KKould Oct 31, 2026
3e6bc2f
perf(execution): reuse value buffers across rows
KKould Oct 31, 2026
f87e47f
test: fix the build and expectations after the table id refactor
KKould Oct 31, 2026
1d8f986
chore: bump kite_sql to 0.6.1 and kite_sql_serde_macros to 0.2.6
KKould Oct 31, 2026
239f4db
docs(tpcc): refresh the TPC-C results
KKould Oct 31, 2026
e25d8ee
ci: pin Python 3.12 for clippy, since pyo3 0.23 rejects 3.14
KKould Oct 31, 2026
92cad28
test(sqlite): skip SQLite-only repeated UPDATE assignments
KKould Nov 1, 2026
adaea82
refactor: trim alias targets, binder lookups and execution guards
KKould Nov 1, 2026
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
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
# `--all-features` builds the pyo3 bindings, which need a supported Python.
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: Swatinem/rust-cache@v2

- name: Run cargo clippy
Expand Down
47 changes: 18 additions & 29 deletions Cargo.lock

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

10 changes: 4 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

[package]
name = "kite_sql"
version = "0.6.0"
version = "0.6.1"
edition = "2021"
build = "build.rs"
authors = ["Kould <kould2333@gmail.com>", "Xwg <loloxwg@gmail.com>"]
description = "SQL as a Function for Rust"
documentation = "https://docs.rs/kite_sql/latest/kite_sql/"
Expand Down Expand Up @@ -33,7 +32,7 @@ macros = []
orm = ["macros"]
parser = ["dep:sqlparser"]
rocksdb = ["dep:rocksdb"]
unsafe_txdb_checkpoint = ["rocksdb", "dep:librocksdb-sys"]
unsafe_txdb_checkpoint = ["rocksdb"]
lmdb = ["dep:lmdb", "dep:lmdb-sys"]
pprof = ["pprof/criterion", "pprof/flamegraph"]
python = ["parser", "dep:pyo3"]
Expand All @@ -57,7 +56,7 @@ required-features = ["pprof"]
bumpalo = { version = "3", default-features = false, features = ["collections"] }
ordered-float = { version = "4" }
paste = { version = "1" }
kite_sql_serde_macros = { version = "0.2.5", path = "kite_sql_serde_macros" }
kite_sql_serde_macros = { version = "0.2.6", path = "kite_sql_serde_macros" }

# Optional dependencies for features
comfy-table = { version = "7", default-features = false, optional = true }
Expand All @@ -79,10 +78,9 @@ sqlite = { version = "0.34" }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
# Optional dependencies for features
librocksdb-sys = { version = "0.17.1", optional = true }
lmdb = { version = "0.8.0", optional = true }
lmdb-sys = { version = "0.8.0", optional = true }
rocksdb = { version = "0.23", optional = true, default-features = false, features = ["bindgen-runtime"] }
rocksdb = { version = "0.25", optional = true, default-features = false, features = ["bindgen-runtime"] }
rustyline = { version = "14", default-features = false, optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,4 @@ wasm-examples:
native-examples:
$(CARGO) run --example hello_world
$(CARGO) run --example transaction
$(CARGO) run --example program
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ fn main() -> Result<(), DatabaseError> {
}
```

More: [hello_world](examples/hello_world.rs), [transaction](examples/transaction.rs).
More: [hello_world](examples/hello_world.rs), [transaction](examples/transaction.rs), [program](examples/program.rs).

## Storage Backends
| Builder | Storage |
Expand All @@ -95,7 +95,7 @@ More: [hello_world](examples/hello_world.rs), [transaction](examples/transaction
| `build_in_memory()` | In-memory, for tests and temporary data |
| `build_optimistic()` | RocksDB with optimistic transactions |

Feature flags, checkpoints, and transaction isolation: [docs/features.md](docs/features.md), [docs/transaction-isolation.md](docs/transaction-isolation.md).
Feature flags, checkpoints, and transaction isolation: [docs/features.md](docs/features.md).

## Shell, WebAssembly, Python

Expand Down Expand Up @@ -135,9 +135,9 @@ print(list(db.run("select * from demo")))

| Backend | TpmC | New-Order | Payment | Order-Status | Delivery | Stock-Level |
| --- | ---: | ---: | ---: | ---: | ---: | ---: |
| KiteSQL LMDB | 165956 | 303 | 75 | 43 | 436 | 318 |
| KiteSQL RocksDB | 50739 | 392 | 188 | 198 | 11743 | 812 |
| SQLite (WAL, `synchronous=OFF`) | 191484 | 274 | 41 | 33 | 343 | 268 |
| KiteSQL LMDB | 187161 | 274 | 68 | 40 | 454 | 278 |
| KiteSQL RocksDB | 46291 | 374 | 184 | 201 | 14463 | 651 |
| SQLite (WAL, `synchronous=OFF`) | 179039 | 291 | 43 | 38 | 368 | 320 |

👉 [Details and how to reproduce](tpcc/README.md)

Expand Down
93 changes: 0 additions & 93 deletions build.rs

This file was deleted.

4 changes: 2 additions & 2 deletions docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,14 @@ let kite_sql = DataBaseBuilder::path("./data")
### MVCC Transaction
- Pessimistic (Default)
- Optimistic
- Isolation levels: see [Transaction Isolation](transaction-isolation.md)
- Isolation level: repeatable read; every statement in a transaction reads the snapshot taken when it began

### Checkpoint
KiteSQL exposes checkpoint as a storage capability rather than a full backup workflow. A checkpoint only creates a consistent local snapshot directory; compressing, uploading, retaining, and pruning backups should stay in application code.

Support matrix:
- `build_optimistic()` supports `Database::checkpoint(...)` through RocksDB's safe checkpoint API.
- `build_rocksdb()` requires Cargo feature `unsafe_txdb_checkpoint` because upstream `rocksdb` does not currently expose a safe `TransactionDB` checkpoint API.
- `build_rocksdb()` requires Cargo feature `unsafe_txdb_checkpoint`, which uses RocksDB's `TransactionDB` checkpoint API.
- `build_lmdb()` and `build_in_memory()` do not currently expose checkpoint support.

Opt in for `TransactionDB` checkpoint support:
Expand Down
Loading
Loading