v2.2.0

Tue, 11 Feb 2025 00:00:00 GMT

Features:

* [Added shortest path queries](https://github.com/surrealdb/surrealdb/pull/5267)
* [Added support for graph clauses](https://github.com/surrealdb/surrealdb/pull/5424)
* [Added `object::is_empty()` function](https://github.com/surrealdb/surrealdb/pull/5303)
* [Added variable support for shortest path queries](https://github.com/surrealdb/surrealdb/pull/5330)
* [Added support of keys only logic with index iterators](https://github.com/surrealdb/surrealdb/pull/5338)
* [Added `SURREAL_COUNT_BATCH_SIZE` env variable](https://github.com/surrealdb/surrealdb/pull/5369)
* [Added `type::is::range()` method and idiom `.is_range()` method](https://github.com/surrealdb/surrealdb/pull/5203)
* [Added Support for memory threshold limits](https://github.com/surrealdb/surrealdb/pull/5221)
* [Added environment variables to diable tracing and metrics](https://github.com/surrealdb/surrealdb/pull/5223)
* [Added support for datetimes for `rand::time` function](https://github.com/surrealdb/surrealdb/pull/5202)
* [Added support of compound indexes on AND queries](https://github.com/surrealdb/surrealdb/pull/5185)
* [Enabled allocation tracking](https://github.com/surrealdb/surrealdb/pull/5277)
* [Added `DEFAULT ALWAYS` clause](https://github.com/surrealdb/surrealdb/pull/5456)
* [Implemented `FETCH` for live queries](https://github.com/surrealdb/surrealdb/pull/5442)

Bug fixes:

* [Fixed Index is corrupted - TreeNode out of bounds](https://github.com/surrealdb/surrealdb/pull/5313)
* [Enabled ANSI code support on Windows](https://github.com/surrealdb/surrealdb/pull/5341)
* [Fixed (-$param) failed bug in Parser](https://github.com/surrealdb/surrealdb/pull/5358)
* [Fixed index\_hnsw bench](https://github.com/surrealdb/surrealdb/pull/5366)
* [Allowed escape characters inside mathematical angle bracket escaped idents](https://github.com/surrealdb/surrealdb/pull/5262)
* [Fixed allocator on Windows](https://github.com/surrealdb/surrealdb/pull/5299)
* [Fixed parse buffer not properly growing](https://github.com/surrealdb/surrealdb/pull/5398)
* [Reintroduced id selection behaviour](https://github.com/surrealdb/surrealdb/pull/5413)
* [Fixed design for live queries cache](https://github.com/surrealdb/surrealdb/pull/5390)
* [Fixed array::transpose() not adding NONE at non-existent indexes when transposing arrays of varying length](https://github.com/surrealdb/surrealdb/pull/5433)
* [Fixed concurrent index creation with overwrite](https://github.com/surrealdb/surrealdb/pull/5482)
* [Ensure INSERT IGNORE does not throw error](https://github.com/surrealdb/surrealdb/pull/5520)

Optimizations:

* [Introduced language testing suite](https://github.com/surrealdb/surrealdb/pull/5165)
* [Added cross-transaction caching to database and table statements](https://github.com/surrealdb/surrealdb/pull/5460)
* [Disallow mismatched field types](https://github.com/surrealdb/surrealdb/pull/5461)
* [Skip processing documents when START is specified](https://github.com/surrealdb/surrealdb/pull/5463)
* [Added minor optimisations for SELECT count() FROM table GROUP ALL queries](https://github.com/surrealdb/surrealdb/pull/5295)
* [Implemented priority queue for queries with ORDER and LIMIT](https://github.com/surrealdb/surrealdb/pull/5321)
* [Improved error messages for HTTP database functions](https://github.com/surrealdb/surrealdb/pull/5325)
* [Reworked query streaming and error reporting](https://github.com/surrealdb/surrealdb/pull/5326)
* [Disabled `PARALLEL` option](https://github.com/surrealdb/surrealdb/pull/5334)
* [Added file URL handling and tests for store initialization](https://github.com/surrealdb/surrealdb/pull/5340)
* [Added default limit for max open files with rocksdb storage engine](https://github.com/surrealdb/surrealdb/pull/5205)
* [Removed `-log trace` from Docker instructions](https://github.com/surrealdb/surrealdb/pull/5207)
* [Increased Rust Memory allocation, parallelism infos and RocksDB block cache size](https://github.com/surrealdb/surrealdb/pull/5227)
* [Added initial support for improved retryable transaction errors](https://github.com/surrealdb/surrealdb/pull/5184)
* [Simplified field processing logic](https://github.com/surrealdb/surrealdb/pull/5244)
* [Optimised transaction multi-get function interface](https://github.com/surrealdb/surrealdb/pull/5239)
* [Optimised RocksDB key-value gets](https://github.com/surrealdb/surrealdb/pull/5270)
* [Added `stdout` and `stderr` log splitting](https://github.com/surrealdb/surrealdb/pull/5271)
* [Added tests for other SDKs in CI](https://github.com/surrealdb/surrealdb/pull/5405)
* [Moved all experimental features to experimental capabilities](https://github.com/surrealdb/surrealdb/pull/5394)
* [Streamlined FoundationDB features](https://github.com/surrealdb/surrealdb/pull/5416)
* [Improved RocksDB block cache configuration](https://github.com/surrealdb/surrealdb/pull/5417)
* [Remove naive concurrency rate limiter in WebSocket](https://github.com/surrealdb/surrealdb/pull/5452)
* [Added dedicated threadpool for storage engine operations](https://github.com/surrealdb/surrealdb/pull/5453)
* [Skip strategy down to scanner for `START` queries](https://github.com/surrealdb/surrealdb/pull/5470)
* [Allow chaining path operations](https://github.com/surrealdb/surrealdb/pull/5471)
* [Implement support for RPC protocol versioning](https://github.com/surrealdb/surrealdb/pull/5513)
* [Switch to tokio::mpsc from async\_channel in WebSocket](https://github.com/surrealdb/surrealdb/pull/5517)
* [Allow configurable background flush syncing](https://github.com/surrealdb/surrealdb/pull/5522)

SurrealKV:

* [Expose surrealkv config options as env variable](https://github.com/surrealdb/surrealdb/pull/5297)
* [Enable data durability configuration on RocksDB and SurrealKV](https://github.com/surrealdb/surrealdb/pull/5466)

Workflow improvements:

* [Fixed nightly version prefix](https://github.com/surrealdb/surrealdb/pull/5348)
* [Added `Tx::count()`, `Tr::count()`, and `kvs::count()` methods](https://github.com/surrealdb/surrealdb/pull/5351)
* [Fixed `make check` and `cargo make ci-check-wasm` commands](https://github.com/surrealdb/surrealdb/pull/5352)
* [Made all count/group use transaction::count method](https://github.com/surrealdb/surrealdb/pull/5354)
* [Documented core as internal only and remove doc(hidden)](https://github.com/surrealdb/surrealdb/pull/5194)
* [Added support for minimum number of tokio worker threads](https://github.com/surrealdb/surrealdb/pull/5211)
* [Removed development panic backtrace on transaction drop](https://github.com/surrealdb/surrealdb/pull/5217)
* [Fixed clippy warnings](https://github.com/surrealdb/surrealdb/pull/5218)
* [Added Compute args for idiom methods](https://github.com/surrealdb/surrealdb/pull/5200)
* [Ensured Windows builds have a default allocator](https://github.com/surrealdb/surrealdb/pull/5236)
* [Optimised `Options` and `Auth` core engine internals](https://github.com/surrealdb/surrealdb/pull/5239)
* [Added error logging for `make sql` and `make repl`](https://github.com/surrealdb/surrealdb/pull/5274)
* [Added Goodbye message to terminal before exiting](https://github.com/surrealdb/surrealdb/pull/5402)
* [Improved Issue templates](https://github.com/surrealdb/surrealdb/pull/5454)
* [Fixed GitHub issue labeling](https://github.com/surrealdb/surrealdb/pull/5457)

Experimental:

* [Changed bearer key storage and verification to only use hashes](https://github.com/surrealdb/surrealdb/pull/5342)
* [Implement refresh tokens for record users](https://github.com/surrealdb/surrealdb/pull/5230)
* [Added functions to GraphQL](https://github.com/surrealdb/surrealdb/pull/5279)
* [Added Record references to GraphQL](https://github.com/surrealdb/surrealdb/pull/5300)

Breaking changes:

* [array::transpose() now adds NONE at non-existent indexes when arrays vary in length](https://github.com/surrealdb/surrealdb/pull/5433).