Releases: tursodatabase/libsql
libsql-server-v0.22.7
Merge pull request #732 from tursodatabase/bump-libsql-server-0.22.7 bump libsql-server to 0.22.7
v0.2.2
Changes
- crates/{core,libsql-sys}: Add Statement.finalize() @penberg (#355)
- libsql/core: Implement Connection::close() for V2 @penberg (#354)
- libsq/core: Fix integer truncation in values @penberg (#356)
- chore: apply clippy fixes @psarna (#352)
- libsql/core: Improve named parameter tests @penberg (#351)
- Go/C bindings add authToken support @haaawk (#349)
- Remove patched crates and update tonic/prost @LucioFranco (#348)
- libsql/replication: Remove grpc decoding limits @LucioFranco (#346)
- libsql/core: Add Row::get() to V2 API @penberg (#341)
- libsql/core: Add Connection::changes() to V2 API @penberg (#340)
- libsql/core: Add Row::column_type() to V2 API @penberg (#339)
- libsql/core: Add Connection::is_autocommit() to V2 API @penberg (#338)
- libsql/replication: Add
Proxy
client @LucioFranco (#336) - libsql/core: Improve error message when sync is not supported @penberg (#334)
- libsql/replication: Remove
context
call @LucioFranco (#335) - Go/C migrate to v2 @haaawk (#332)
- libsql/core: Handle null statement in batch @LucioFranco (#330)
- libsql/replication: Update example and errors @LucioFranco (#329)
- libsq/core: Fix with_http_sync() with
libsql://
scheme @penberg (#326) - Use
read_exact
instead ofread_exact_at
@avinassh (#325) - Fix broken import @avinassh (#324)
- libsql/core: Fix row ordering with Hrana @penberg (#320)
- libsql/core: Add auth token parameter to open_remote() in V2 @penberg (#322)
- libsql/replication: Improve tracing for client @LucioFranco (#323)
- libsql/core: Add support for
libsql://
scheme in Hrana @penberg (#321) - libsql/core: Implement Database::sync() in V2 @penberg (#317)
- libsql/core: Implement hrana Rows::column_name() @penberg (#316)
- libsql/core: Implement hrana Connection::last_insert_rowid() @penberg (#315)
- libsql/core: Implement hrana Statement::reset() @penberg (#314)
- Use latest stable Rust toolchain in CI @penberg (#313)
- libsql/replication: Use grpc-web @LucioFranco (#312)
- libsql/core: Fix statement step error handling @LucioFranco (#311)
- libsql/core: Add open_with_sync() to V2 @penberg (#309)
- libsql/core: Add Rows::column_{count,name}() to V2 @penberg (#310)
- libsql/core: Add Statement::columns() to V2 @penberg (#308)
- libsql/core: Add Connection::last_insert_rowid() to V2 @penberg (#307)
- libsql/v2: Add
execute_batch
and transactions @LucioFranco (#306) - libsql/core: Add
v2
api @LucioFranco (#298) - Return correct error from Rows::next @haaawk (#302)
- libsql/core: display the error message in LibError @aqrln (#301)
- libsql/core:
column_names
returnOption<&str>
@LucioFranco (#303) - Fix Statement::step() error handling @penberg (#300)
- Fix Github actions workflow names @penberg (#299)
- libsql/core: add code to FetchRowFailed and use extended error codes @aqrln (#296)
- libsql/core: Clean up sqlite3 on drop @LucioFranco (#293)
- Column API improvements @penberg (#292)
- libsql/shell: commands completion @piotrkira (#289)
- libsql/core: Fix Column::decl_type() @penberg (#290)
- libsql: Use
SQLITE_TRANSIENT
for text/blob @LucioFranco (#287) - libsql/core: add error code to Error::PrepareFailed @aqrln (#285)
- libsql/core: Implement Rows::as_ref() @penberg (#280)
- libsql/core: Switch to TryInto for params @LucioFranco (#284)
- Fix compilation errors on platforms with unsigned chars @aqrln (#281)
- Update critierion to remove atty @LucioFranco (#274)
- libsql/core: Add
params_from_iter
@LucioFranco (#273) - libsql/core: Add libsql::version() and libsql::version_number() @penberg (#269)
- Add rusqlite license @LucioFranco (#275)
- libsql/core: Add
Connection::execute_batch
@LucioFranco (#272) - libsql/core: Add SQLite error message to LibError @penberg (#270)
- Golang bindings sync support @haaawk (#264)
- Add ALTER TABLE ALTER COLUMN statement @psarna (#245)
- libsql/core: Add support for transactions @penberg (#261)
- Add Go bindings tests to CI @haaawk (#263)
- Fix query @haaawk (#262)
- libsql/core: Fix test and example compilation @penberg (#260)
- libsql/core: Fix benchmark compilation @penberg (#259)
- libsql/replication: Use patched version of tonic @LucioFranco (#258)
- libsql/replication: Add gRPC auth @LucioFranco (#257)
- libsql/core: Fix params and named_params macros @penberg (#256)
- libsql/core: Fix Statement::execute() signature @penberg (#255)
- replication: elide copying frame buffers @psarna (#254)
- libsql/replication: Switch to BatchLogEntries RPC @penberg (#253)
- Fix build @haaawk (#252)
- replication: fix off-by-one error @psarna (#251)
- connection: drop the lifetime parameter @psarna (#250)
- Add error handling to C/Go bindings @haaawk (#248)
- libsql/replication: Move to gRPC based endpoints @LucioFranco (#249)
- Implement more Golang bindgs @haaawk (#243)
- libsql: Fix SIGSEGV when
Connection
is dropped before statements @penberg (#240) - Add bind_value() based on ValueRef @psarna (#239)
- libsql/core: Add query, query_row, and query_map @LucioFranco (#238)
- libsql/core: Add blob type support @LucioFranco (#237)
- Move Python bindings to separate repository @penberg (#236)
- crates/core: add ValueRef and Column @psarna (#235)
- libsql/core: Add named parameter support @LucioFranco (#234)
- Fix
libsqlapi
target to run all the tests @penberg (#232) - libsql/core: Add prepared statements clean up test @LucioFranco (#231)
- libsql/core: Fix rustdoc tests @LucioFranco (#230)
- replication: move to rustls @psarna (#229)
- rust_suite: add a test for accounting rows read with DESC order @psarna (#228)
- vdbe: bump ROWS_READ in ORDER BY x DESC queries @psarna (#227)
- replication: switch to HTTP @psarna (#225)
- go bindings: Fix LDFLAGS @haaawk (#224)
- add sqlite3_close_hook @psarna (#219)
- libsql/core: Improve error handling @penberg (#223)
- libsql/core: Add "rt-multi-thread" feature to Tokio @penberg (#222)
- libsql: Make Database::sync() async @penberg (#221)
- libsql: Switch Database::sync() to use interior mutability @penberg (#220)
- libsql: Remove external
protoc
dependency @penberg (#218) - Move libsql JavaScript bindings to an external repository @penberg (#217)
- crates/core: allow amalgamation-driven builds @psarna (#216)
- CI: add maketestwasm to the merge group @psarna (#215)
- libsql: Improve database open API @penberg (#214)
- replication: add gRPC-based replication @psarna (#209)
- Move raw::{Statement, Value} to libsql-sys crate @psarna (#213)
- libsql/js: Consolidate test cases @penberg (#212)
- Improve JavaScript bindings @penberg (#211)
- libsql: Fix Python package name @penberg (#210)
- libsql: Add wasm bindings scaffolding @penberg (#208)
- Wire libSQL API to Github CI @penberg (#198)
- libsql/replication: Fix InjectorHook {pre,post}_commit types @penberg (#207)
- libsql-sys: Mark Connection as Send @penberg (#205)
- Add libSQL API mention to top-level README @penberg (#203)
- libsql: Improve core crate documentation @penberg (#202)
- replica: validate frame numbers when applying snapshots @psarna (#201)
- Replication: iteration 2 @psarna (#199)
- libsql: Improve documentation @penberg (#197)
- crates/replication: initial commit @psarna (#184)
- libsql/core: Add params macro @penberg (#196)
- libsql/core: Test cleanup @penberg (#195)
- libsql/core: Move more code to the raw API @penberg (#194)
- Add raw API to libSQL core @penberg (#193)
- libsql/core: Clean up error handling @penberg (#192)
- libsql/core: Implement Drop for Statement @penberg (#191)
- libsql/core: Add Statement::reset() method @penberg (#190)
- Clippy fixes @penberg (#189)
- libsql/core: Improve benchmark perf experience @penberg (#188)
- libsql/core: Fix SIGSEGV when accessing NULL text column @penberg (#186)
- libsql/core: Test code cleanup @penberg (#185)
- crates/core: update to newest libsql-sys @psarna (#183)
- rearrange src/rust into crates/ @psarna (#182)
- libSQL API positional parameter support @penberg (#181)
- Experimental libSQL API @penberg (#180)
- vdbe: fix ROWS_WRITTEN metrics @psarna (#179)
- [Rust Shell] Implement a few dot commands @benclmnt (#177)
- rust: add Rust bindings @psarna (#178)
- test/rust: link libsqlite3 statically @psarna (#158)
- fix: Heap Use After Free at wal.c:1524 @junwha0511 (#175)
- release pipeline for linux x86_64, aarch64, darwin arm64 @dyasny (#176)
- vdbe: count virtual table reads in ROWS_READ metrics @psarna (#174)
- fix blog link @glommer (#173)
- add user context pointer to sqlite3 struct @MarinPostma (#167)
- Fix a typo in a bitvec comment. @ttsugriy (#171)
- Merge SQLite master branch - May 23th 2023 @psarna (#170)
- udf: fix memory leak for libsql_wasm_engine_new @psarna (#169)
- Add quit and tables command @piotrkira (#166)
- revert signature change of sqlite3_snapshot_cmp @copiousfreetime (#163)
- Add test for StrStatements iterator & fixes @piotrkira (#161)
- Parse and execute multiple statements at once @piotrkira (#159)
- crsqlite: db lock fix, crsql_master simplification @tantaman (#156)
- Merge SQLite master branch - Apr 20th 2023 @psarna (#155)
- sync cr-sqlite to ext/crr @tantaman (#151)
- Merge SQLite master branch - Mar 28th 2023 @psarna (#150)
libSQL v0.2.1
libsql v0.2.1
- WasmEdge and Wasmtime runtimes for user-defined functions now support WASI; WasmEdge can also work with custom plugins
CREATE FUNCTION
andDROP FUNCTION
is now unconditionally supported in the grammar; no change in existing semantics, it simply makes the amalgamation distribution simpler- the new Rust libSQL shell is now included in the source code - contributions welcome!
- additional metrics -
LIBSQL_STMTSTATUS_ROWS_READ
andLIBSQL_STMTSTATUS_ROWS_WRITTEN
are now available insqlite3_stmt_status
- and more!
libSQL v0.2.0
The libSQL team is pleased to announce libSQL 0.2.0!
This release comes with a bunch of features and fixes, including:
Virtual WAL
Write-ahead log is a journaling mode which enables nice write concurrency characteristics - it not only allows a single writer to run in parallel with readers, but also makes BEGIN CONCURRENT
transactions with optimistic locking possible (once BEGIN CONCURRENT
gets merged upstream*). In SQLite, WAL is not a virtual interface, it only has a single file-based implementation, with an additional WAL index kept in shared memory (in form of another mapped file). In libSQL, akin to VFS, it's possible to override WAL routines with custom code. That allows implementing pluggable backends for write-ahead log, which opens many possibilities (again, similar to the VFS mechanism).
Virtual WAL is already used in sqld and bottomless S3 storage for libSQL.
WasmEdge support for user-defined functions
It is now possible to pick WasmEdge as the WebAssembly runtime powering our user-defined functions. WasmEdge is a very lightweight runtime, and yet fully feature-complete, with a slim build that takes only around 1MiB. That makes it a perfect choice for environments with storage limits, like embedded systems, but also serverless infrastructure. In order to compile libSQL with WasmEdge, install the libwasmedge
library and configure libSQL with ./configure --enable-wasm-runtime-wasmedge
. A WasmEdge-flavored build is also available at our 0.2.0 release page.
auto-initialization for WebAssembly user-defined functions
It is no longer required to initialize the WebAssembly UDF function table explicitly before executing a CREATE FUNCTION
statement - the initialization will be performed automatically.
Note that for backward compatibility purposes it's still required to run try_initialize_wasm_func_table
(or .init_wasm_func_table
in shell) prior to the first execution of a Wasm-backed user-defined function.
New method in sqlite3_module
: xPrepareSql
(contributed!!!)
A new method named xPrepareSql
is added to the sqlite3_module
struct. An
associated opcode VPrepareSql
is added as well. That opcode is emitted immediately before a VFilter opcode when querying virtual tables.
xPrepareSql
gives an opportunity for the virtual table implementation to
inspect the query string and selectively choose which columns from the
remote server to pull and cache locally.
liblibsql.so
and liblibsql.a
libraries
Release 0.1.0 shipped the libSQL library in the form of libsqlite3.so
and libsqlite3.a
libraries, under the assumption that they should be used as drop-in replacement for an existing SQLite installation. It is however useful to be able to keep SQLite intact and use libSQL libraries only for a specific project. For that purpose, 0.2.0 comes with more artifacts: liblibsql.so
and liblibsql.a
. They contain exactly the same binary data as their sqlite3 counterparts, but there's no longer a name clash and thus libSQL 0.2.0 can be used alongside any existing SQLite installation.
This change was inspired by our brand new Python driver, https://github.com/libsql/pylibsql/, which now depends on the libsql
dynamic library.
libsql_api_routines
In order to keep libSQL extension mechanism compatible with the one in SQLite, additional API routines are now kept in a separate structure - libsql_api_routines
. The original sqlite3_api_routines
structure is left intact.
Fixes, fixes, fixes
Lots of fixes of our code and documentation, some of them contributed by the community, are part of the 0.2.0 release as well!
Hall of Fame
libSQL is not only Open-Source, but also Open-Contribution. Huge kudos to all contributors, thanks for making this release happen!
69 Piotr Sarna
19 Pekka Enberg
5 Lucas C. Villa Real
4 Jan Špaček
3 ad hoc
2 Glauber Costa
1 T.J. Yang
1 Doug Stevenson
1 belzecue
libSQL v0.1.0
libSQL 0.1.0 release notes
The libSQL team is pleased to announce libSQL 0.1.0!
This release comes with the following features and fixes:
CREATE FUNCTION: support for WebAssembly user-defined functions
User-defined functions are here, available straight from SQL! The new CREATE FUNCTION
and DROP FUNCTION
syntax allows to manage functions dynamically right from the SQL interpreter, without having to register them via any API calls.
Support for user-defined functions is experimental and needs to be explicitly enabled via configure:
./configure --enable-wasm-runtime
.
WebAssembly is a compiled language, so with the release come helper projects to make creating new user-defined functions easy:
- https://bindgen.libsql.org/
an interactive playground for compiling Rust code to WebAssembly user-defined functions for libSQL - https://github.com/libsql/libsql_generate
source-code for the playground above - https://crates.io/crates/libsql_bindgen
a Rust crate used to transform native Rust code to WebAssembly user-defined functions for libSQL
Current implementation runs on Wasmtime and can be compiled either as a separate dynamic library, or as monolith. The support is implemented directly in Wasmtime’s native language — Rust — and linked with existing C code. Next on our plate: integration with V8) API as well as WasmEdge, [Wasmer.io](http://wasmer.io/) and more!
New test suite
SQLite is famous for its extensive test coverage, which is the foundation of its robustness and reliability. Existing SQLite tests are already part of our continuous integration. What’s less broadly known is that one of the test suites providing 100% branch coverage to SQLite — TH3 — is proprietary.
In libSQL we insist on making the whole source code available, tests included, and that’s why we added yet another test suite to the pack. SQLite OSS tests are written in Tcl. We are not experts in Tcl, so the new suite is based on the Rust toolchain.
We acknowledge that this test suite is not extensive as TH3, but we do plan to work towards it, and your contributions for new tests are always welcome! The new suite is available at test/rust_suite. If you are new to libSQL, and want to contribute, that’s a great start.
optimization of ext/wasm build
ext/wasm extension allows building libSQL to Wasm. It's a fantastic initiative kickstarted back at SQLite. We applied a few rounds of optimization on top of the project to make it even more lightweight and fast - reducing the module size from over 3MiB to less than 1MiB. A preview for the optimized playground application is hosted here: https://playground.libsql.org/.
RANDOM ROWID
Tables can now be created with an additional RANDOM ROWID directive, which switches the rowid generation algorithm from sequential numbers to trying pseudorandom values until an available one is found. This feature was requested in context of mvSQLite, a distributed SQLite-compatible database, where sequential row ids are much more likely to cause contention with multiple writers.
Lots of fixes and amendments
- improved
make clean
to cover more files - added explicit I/O flush in
iotrace
mode - added a
.gitignore
file - dropped
.fossil-settings
- and more!
Contributions
libSQL is not only Open-Source, but also Open-Contribution. Huge kudos to all contributors, thanks for making this release happen!