Our newsletter
Get tutorials, AI agent recipes, webinars, and early product updates in your inbox every two weeks
Release v3.1.0-beta.1
Released on May 1, 2026
This is the first beta in the 3.1 series. The focus is bug fixing and stabilisation of the 3.0 line, with a number of substantial additions on top of the fixes that already shipped in v3.0.1–v3.0.5.
Highlights
Bug fixes and stabilisation
This release fixes over 40 community-reported bugs.
A first-party Model Context Protocol (MCP) server
Exposed as a surreal mcp stdio subcommand for local IDE integrations, and as an HTTP /mcp endpoint guarded by the existing authentication middleware.
The tool surface includes typed
query,select,create,insert,upsert,update,delete,relate,info,list,use, andruntoolsread_only_hint/destructive_hintannotations so MCP clients can prompt the user before mutating operationsRequest bodies are bound as typed
Variablesrather than string-interpolatedIdentifiers are validated against a strict allow-list
Per-request subject verification rejects cross-session credential reuse
New environment variables:
SURREAL_HTTP_MAX_MCP_BODY_SIZE(default 4 MiB),SURREAL_MCP_QUERY_TIMEOUT_SECS(default 60 s),SURREAL_MCP_MAX_RESULT_BYTES(default 256 KiB),SURREAL_MCP_RUN_MAX_ARGS(default 64), andSURREAL_MCP_PARAMS_MAX_KEYS(default 256)
A unified observability and monitoring pipeline built on OpenTelemetry
Overhauled the observability and monitoring layer onto a single OpenTelemetry pipeline.
The previous community Prometheus path and the parallel
OtelObserverSemConv pipeline have been collapsed onto oneSdkMeterProviderand oneSdkLoggerProviderEvery signal is recorded once and routed to many exporters: Prometheus text on
/metrics, OTLP metrics push, OTLP logs pushMetric families are reorganised under the
surrealdb.*scope (statement, query, transaction, RPC, auth, session, network, HTTP, live query, process, storage)The
/metricsendpoint enforces a render-timePUBLIC_METRICSallow-list: anonymous scrapers see only aggregate process gauges, while root-authenticated operators see the full surfaceTenant context (
namespace/database/user) is carried on every labelled family but filtered out of the public view by family nameNew environment variable:
SURREAL_PROCESS_METRICS_REFRESH_INTERVAL(default 5 s)Retired:
SURREAL_TELEMETRY_NAMESPACE,SURREAL_TELEMETRY_RPC_LIVE_IDRepurposed:
SURREAL_METRICS_ENABLEDThis is a breaking change for existing dashboards; see
doc/OBSERVABILITY.mdfor the migration table
Memory optimisations on the value layer
A round of memory work on the value layer including a 24-byte small-string-optimised Strand type, a new surrealdb-collections crate with VecMap/VecSet, and a per-transaction overhead reduction on the hot path.
Introduced
Strand, a 24-byte small-string-optimised immutable string type, routed through every core hot-path string:Value::String,Objectkeys,TableName, andRecordIdKey::StringStrandpacks into the same 24 bytes asStringvia arepr(C)SmolStr-style tagged union, with an inline variant storing strings up to 23 bytes with zero heap allocationA heap variant uses
Arc<str>so clones are a refcount bump rather than a copyObject entries and
Value::Stringshrink by 8 bytes each, which compounds at document scaleThe wire format is unchanged:
Strandserialises identically toStringthroughserde,Revisioned, andstorekeyA companion
Strand::new_staticconstructor lets compile-time-known strings in core skip allocation entirely
Significant RocksDB tuning across the engine
Substantial performance improvements through engine tuning including RocksDB 0.24 upgrade, prefix extractor, blob-file separation by default, and scaled defaults for constrained environments.
RocksDB upgraded to 0.24 with enabled prefix extractor for keyspace-aware bloom filters
Aligned the compaction readahead size to
max_sector_kbon disk (currently 256 KiB on Cloud)Enabled blob-file separation by default for large-value workloads
Scaled defaults for constrained environments (the SurrealDB Cloud free tier sees disproportionate memory and disk pressure on the previous mid-sized defaults)
Large deployments (≥16 GiB memory) keep the previous defaults via tiered scaling; small deployments get appropriately sized buffers, caches, and compaction settings out of the box
Expanded ALTER coverage
Every DEFINE statement now has a matching ALTER counterpart.
Added
ALTERsupport forEVENT,PARAM,BUCKET,ANALYZER,FUNCTION,USER,ACCESS,CONFIG, andAPIEach follows the same property-by-property pattern as the existing
ALTER TABLE/FIELD/INDEXstatementsIndividual properties on a definition can be modified without re-specifying the whole definition via
DEFINE … OVERWRITEALTER PARAMdoes not supportDROP VALUE(a param without a value is meaningless)ALTER EVENTusesDROP ASYNCto revert to synchronous modeALTER ACCESSdoes not allow changing the access type itself (record / JWT / bearer), only durations, theAUTHENTICATEclause, and comment
Improvements
Added
REMOVE CONFIG [IF EXISTS] GRAPHQL | API | DEFAULTto mirrorDEFINE CONFIG, providing a way to deleteGRAPHQL,API, andDEFAULTconfigurations.Extended GraphQL schema generation to support fields whose type is a literal (record / object / array literal types), so they now appear in the generated GraphQL schema rather than being silently omitted.
Added the
surrealdb-collectionsworkspace crate withVecMapandVecSetVec-backed, ordered, insertion-order-preserving map and set types
Tuned for the small-collection workloads that dominate SurrealDB's value layer
ObjectandSetinsurrealdb-corenow use these typesLinear scan for small slices, skipped re-sort when inputs are already ordered, and a tuned linear-vs-binary search threshold
User-facing semantics are unchanged
Upgraded RocksDB to 0.24 and tuned the engine
Enabled prefix extractor for keyspace-aware bloom filters
Aligned the compaction readahead size to
max_sector_kbon disk (currently 256 KiB on Cloud)Enabled blob-file separation by default for large-value workloads
Scaled defaults for constrained environments (the SurrealDB Cloud free tier sees disproportionate memory and disk pressure on the previous mid-sized defaults)
Large deployments (≥16 GiB memory) keep the previous defaults via tiered scaling; small deployments get appropriately sized buffers, caches, and compaction settings out of the box
Reduced per-transaction overhead on the hot path
FunctionRegistry::with_builtinsis now built once per datastore and shared across transactions instead of being rebuilt on every query (was ~22% of CPU on a CREATE-heavy profile)The change-feed
Writeris allocated lazily so transactions that touch no changefeed-enabled tables no longer pay for aDashMap<ChangeKey, TableMutations>and its dropThe per-transaction
quick_cachenow uses a single shard sized for transaction-scope rather than theavailable_parallelism() * 4default, eliminating the 256CacheShardallocations that used to happen on everyTransaction::newon a 64-core host
Updated SurrealKV to 0.21.1 and raised the maximum memtable size for large transactions, allowing larger batches to be inserted without flushing mid-transaction.
Tuned RocksDB scans and grouped-commit
Read-only transactions now bypass the
BaseDeltaIteratormerge layer incount,keys,keysr,scan, andscanr, which removes overhead on every stepThe offload heuristic for moving large scans to the storage threadpool now uses byte-based sizing (including skip work) and handles
BytesOrCountcorrectlyThe grouped-commit coordinators (RocksDB and SurrealKV) had shutdown and lost-wakeup edge cases that could stall threads or callers; both are fixed
Capped the scanner's initial batch size using the query
LIMITso that small-LIMITqueries don't fetch more rows than they will ever return.Added a sync fast-path for
PhysicalExprevaluation in scan filters, avoiding the async overhead for the common case where no IO is required.Avoided cloning the document on
SELECT *projection where the source row can be passed through unchanged, reducing allocator pressure on read-heavy workloads.Replaced the global HTTP client cache (which keyed on a hash of capabilities) with a single
HttpClientinstance perDatastore, exposed viaContext::http_clientRemoves process-wide global state
Simplifies test setup
Removes per-request hashing
Context::backgroundis renamed toContext::new_testand is now test-onlyContext::newis renamed toContext::new_childto make its sub-context role explicit
Made datastore initialisation retry resilient to hung attempts
Each retry attempt is now wrapped in its own per-attempt
tokio::time::timeoutthat increases linearly (10 s, 20 s, 30 s, …)A single hung attempt against a slow or unresponsive storage backend can no longer silently consume the entire retry budget
Per-attempt timeouts and back-off sleeps are capped to the remaining global budget
The global retry budget is raised from 60 s to 120 s
Failures are now logged with a per-task label so the failed operation is identifiable
Exhaustion returns a descriptive
Internalerror instead of re-raising the lastTransactionConflict
Added RocksDB user-defined timestamps and threaded the
VERSIONclause through every internal schema lookupVersioned reads (
SELECT … VERSION d'…',INFO FOR DB / TABLE VERSION …) are now isolated from the LRU transaction cache so historical reads cannot pollute current-time readsThe
VERSIONclause is now propagated through graph and reference traversals, theFETCHclause, automatic record dereferences during field access, and inherited by inner subqueries when the outerSELECTcarries a versionINFO FOR ROOTandINFO FOR NSnow also acceptVERSIONRocksDB gains a custom comparator that stores 8-byte LE timestamps as key suffixes (newer versions ordered before older), with HLC commit timestamps assigned at commit time and
ReadOptions::set_timestampfor point-in-time reads
Overhauled the Surrealism (WASM plugin) stack to v0.2.0 and migrated to WASI Preview 2 (Component Model)
Modules now target
wasm32-wasip2and a WIT interface (surrealism/wit/surrealism.wit) defines the host/guest contractNew
#[surrealism]attribute options:writeable(lets the planner choose appropriate transaction modes),comment(description visible insurreal module infoandINFO FOR DB STRUCTURE),init(one-time init hook with access to host imports), and namespaced module exports that produce prefixed names likemath::addData crossing the host/guest boundary now serialises via FlatBuffers
Modules can declare an attached read-only filesystem (
[attach] fs = "fs"insurrealism.toml) bundled into the.surliarchive and mounted at/inside the WASM sandboxThe host runtime gets a two-engine epoch model — a guarded engine with epoch interruption for timeout enforcement, and a fast engine for trusted compute-heavy modules — selected via
strict_timeoutinsurrealism.toml
Added a builder pattern to
Datastorefor properties that cannot be changed after construction, replacing the previous post-construction settersMakes invalid configurations harder to express
Lets the language-test suite exercise more configuration surfaces
The language-test harness has been overhauled in the same change
Expanded the
surrealdb-typesSDK and derive surfaceAdded
#[surreal(rename_all = "...")]on enums and structs and honoured per-variant#[surreal(rename = "...")](previously parsed only for fields)Added
#[surreal(wrap)]for transparent wrapper typesAdded more
SurrealValueimplementations for standard-library types and aNaiveDateimplementationGeneralised the
Cowand&strSurrealValueimplementationsAdded serde interop on the
ValuetypeRestored query chaining on the
QuerybuilderAdded several missing crate exports
Auto-detect TTY for the console log output and respect the
NO_COLORenvironment variableANSI escape codes are now only emitted when both stdout and stderr are TTYs
Fixes garbled output in Docker containers, Kubernetes pods, and log shippers like Kibana and GKE Log Explorer
Allow
surreal validateto read input from stdin, so SurrealQL can be piped in for syntax checking without writing to a file first.Removed several process-wide configuration globals in
surrealdb-coreso configuration is now carried throughDatastore/Contextrather than read from static state, simplifying embedding and testing.
Bug fixes
[Query Engine]Fixed$parentresolving incorrectly inside graphWHEREclauses in nested subqueries;$parentnow refers to the currentSELECT's row rather than an outer subquery's parent.[Query Engine]FixedFROM ONLYnot being propagated through fused graph lookup chains, which previously produced incorrect results from constrained graph traversals.[Query Engine]FixedORDER BY(andWHERE) being silently ignored in subqueries with graph traversal sources likeFROM $parent->edge->target. The streaming source operator now resolvesRecordIdvalues to full documents so downstreamFilter,Sort,Group, andSplitoperators have the fields they need.[Query Engine]Fixed bare field paths in a subquery'sFROMclause (e.g.FROM data.fileswheredatais a record link on the outer document) evaluating toNONEbecause the source operator had no current value in correlated-subquery context.[Query Engine]Fixed$parentnot being bound duringiterator.prepare, which caused correlated subqueries usingFROM $parent->…(including nestedCREATE,UPDATE, andDELETE) to see$parentunset while select targets were being planned.[Query Engine]Fixed$parentresolution in materialised view definitions on the streaming path so view materialisation now sees the same parent context as the legacy executor.[Query Engine]FixedLETbindings in planned bodies not being visible toIF/FORblocks that fall back to the legacy compute path; the legacyFrozenContextis now refreshed after a plannedLETbody runs.[Query Engine]Fixed$authand$sessionreturningNONEin queries executed inside a client-side transaction; the session is now correctly attached to the per-statement context.[Query Engine]Fixed duplicate constant values being omitted in the streaming executor (e.g.false AS isLiked, false AS isLockedcollapsing to a single column). The expression registry's de-duplication key now includes the alias.[Query Engine]Fixed nested.*destructure returningNONEfor record links;DestructureField::Allnow fetches the linked record before expanding.[Query Engine]FixedSELECTalias shadowing the source field of the same name on the projection fast path.[Query Engine]Preserved alias idiom structure in streaming-executor projections so thatAS foo.barcontinues to nest into{ foo: { bar: _ } }whileASfoo.barstays as a flat key — both the executor projection andGROUP BYalias paths previously stringified the alias and lost the backtick distinction.[Query Engine]Fixed??(null coalescing) and?:(ternary condition) operator precedence binding tighter than arithmetic.$ctx.limit ?? 2 ** 31 - 1now parses as$ctx.limit ?? (2 ** 31 - 1), matching JavaScript / C# / Kotlin / Swift / PHP semantics; previously the operators bound above**,*,/,+, and-, which made??nearly useless without explicit parentheses.[Query Engine]Fixedvalue::diffandvalue::patchreturningFunction 'value::…' requires async executionwhen invoked via method syntax ({a: 1}.diff({a: 2})). The async-vs-sync check now matches the behaviour of the full-path call.[Query Engine]Fixed view materialisation crashing when the sourceSELECTaliased theidfield; initialisation now falls back to scanning for anyRecordIdwhen the"id"key is absent.[Query Engine]Fixed references being created against a target table even when the originatingCREATE/INSERT/RELATE/UPSERT/UPDATEfailed itsCREATEpermission check; references are now cleaned up on the permission-denied error path.[Query Planner]FixedWHEREfilters on indexed fields silently omittingCOMPUTEDfields from evaluation.IndexScan,FullTextScan, andKnnScannow resolve field state and process computed fields through their pipelines, matchingTableScanandUnionIndexScan.[Query Planner]Fixed records withNONE/NULLfields being silently excluded fromORDER BYresults when the sort key was on a unique compound index; unique indexes now storeNONE/NULLtuples in the non-unique key format so they remain visible to scans (REBUILD INDEXis required to fix existing indexes).[Query Planner]FixedSELECT VALUEwithORDER BYignoring the sort order when querying from an array source; theVALUEprojection is now applied after sorting and pagination instead of before.ORDER BYcan also reference aSELECT VALUEalias.[Query Planner]FixedORDER BY DESCwith a variableLIMITinside nestedIF/LETblocks inside a function producing wrong results.[Query Planner]FixedORDER BYon edge-table queries with record-link source fields likein.creationDatereturning unsorted output. The sort path now routes resolved alias expressions through theComputeoperator (which can fetch linked records) and restricts the synchronousFieldPathshortcut to single-part paths where record-link traversal is impossible.[Query Planner]FixedKNN <|K, DISTANCE|>queries bypassing the HNSW index;eval_hnsw_knnnow matches theK(k, d)variant when the distance matches the index configuration.[Indexes]Made full-text, COUNT and HNSW compaction SSI-safe so concurrent index activity no longer drops work that was committed after the compaction snapshot. Compaction is now split-phase and generation-guarded, with conditional writes that advance an internal generation key and delete only the exact delta keys captured in the read phase. Full-text and COUNT compaction plans are bounded toCOUNT_BATCH_SIZE(50,000) delta keys per batch, so a long-stalled delta backlog is processed in fixed-size batches instead of being held entirely in memory. HNSW pending updates now use record-keyed entries so sequential writes from multiple SurrealDB nodes against the same remote backend no longer depend on local append-key ordering.[Indexes]Fixed concurrent index conflicts and reduced overhead during full-text concurrent builds. The initial-build write transaction no longer reads!ip/!igqueue handoff records (those are now read through a separate read-only transaction, so the initial-build write transaction stays out of active queue contention).maybe_consumeno longer writes!ipkeys after the initial build phase. The append-phase commit retries on transient transaction conflicts instead of treating them as fatal. Full-text concurrent builds now reuseFullTextIndexacross documents in a batch instead of recreating it per document.[Indexes]Fixed cascade-delete index bugs that caused COUNT-index drift, ghost UNIQUE-index entries on the relation table after deleting a vertex with edges, and phantom UNIQUE-index entries whenIN/OUTrecords were deleted before the relation. Also fixedprocess_lookuphardcodingNonefor the version parameter, which causedSELECT … WITH VERSIONqueries that traverse graph edges to silently return current-state records instead of the requested historical snapshot.[Live Queries]Terminate live queries on session invalidation and TTL expiry.invalidate()now callscleanup_lqs(), mirroringreset(), so all live-query registrations for the session are removed from the notification engine. The dispatcher also compares the session expiry timestamp against the current time before sending each notification and silently skips expired ones, closing a class of bug where revoked sessions continued receiving CREATE / UPDATE / DELETE events indefinitely.[Live Queries]Prevent ignorable evaluation errors in aLIVE SELECT'sWHEREclause orSELECTprojection (type mismatches, invalid function arguments) from propagating back throughtry_join_alland aborting the enclosing write transaction. Such errors now silently skip the notification.[Storage]Fixed long server non-responsiveness when a client cancelssurreal exportmid-stream. The HTTP export handler now exits the proxy task when the body stream channel fails (indicating client disconnect), which causes the next channel send to fail and aborts the export task — releasing the read transaction promptly. On large databases this previously blocked endpoints like/healthwhile the cancelled export ran to completion.[Indexes/SurrealKV]Allow large transactions to insert without flushing mid-transaction by raising the maximum memtable size for SurrealKV.[RPC/WebSocket]Respond with a failure when an in-flight WebSocket request is cancelled rather than silently dropping it, so clients always observe an explicit response.[Transactions]Surface unifiedCannot COMMIT: …errors when an explicitCOMMITafter a previous statement abort fails (e.g. unique constraint), instead of returning only the first statement error.txn.commit()failures and the post-abortCOMMITfast-forward now share the same error wording so clients no longer treat a missing row as success.[Auth]Fixedidresolving toNONEinside a table'sFOR select WHERE … permissionclause when a record was created and selected in the same statement (SELECT * FROM ONLY (CREATE ONLY a)), which previously caused the record to be filtered out by its ownSELECTpermission.RecordId::select_documentnow re-injects theidinto the returned object when it's missing on a transaction-cache hit.[Auth]Fixed user-defined functionPERMISSIONSclauses being evaluated for system-level users (root, namespace, database).PERMISSIONSare intended only for record-level users; system-level users withAction::Viewnow correctly bypass the check and can invoke functions defined withPERMISSIONS NONE. Also removed a hardcodedfn::prefix from theFunctionPermissionserror message that produced double-prefixed names likefn::fn::my_function.[Functions]Addedencoding::json::encodeandencoding::json::decodefor serialising SurrealDB values to / from JSON strings, and added support for UTF-16 surrogate-pair escape sequences (\uD800–\uDFFF) in the JSON parser. The surrogate-pair support is gated on ajson_string_escapesparser setting so SurrealQL string parsing is unaffected.[Functions]Useserde_jsonto parse external JSON inhttp::*functions so valid JSON responses containing escaped forward slashes (\/) — produced by defaultjson_encode()in PHP and other systems — are no longer rejected by SurrealQL's own JSON parser.[Functions]Fixedinfinityoutput and added a non-abbreviated constant path so that the constant is preserved on round-trip.[Functions]Fixed user-duration structure so that durations defined and stored on user definitions round-trip correctly.[Types/SDK]Fixed stack overflow on recursiveSurrealValuetypes so deeply nested or self-referential type definitions no longer crash on encode / decode.[Types/SDK]FixedSurrealValuederive macro emittingr#typeinstead oftypefor raw-identifier struct fields. Fields liker#type: Stringnow serialise as"type"without needing an explicit#[surreal(rename = "type")]attribute.[Types/SDK]Fixed a copy-paste bug inprepare_array(initerator.rs) that checkedx[0]forPart::Lookupafter already matching it asPart::Start, making the lookup-optimisation branch dead code. All edge traversals inside arrayFROMclauses (SELECT * FROM [a:1->edge->table]) previously fell through to the slowerprepare_computedpath; the optimisedprepare_lookuppath is now reached.[Types/SDK]Fixed JSON-patchremoveoperation on lists.[Types/SDK]FixedCREATEfailing for fields typed asset<…>.[Imports/Exports]Fixed re-importing an exported database failing with "field already exists" errors. Export now emitsDEFINE FIELD OVERWRITEso a clean re-import succeeds without manual intervention.[Logging]Fixed JSON log format being unused even when configured.[Logging]Fixed ANSI escape codes leaking into JSON log output (which previously produced corrupt records like"level": "\x1b[32mINFO\x1b[0m") and added per-stream TTY detection so mixed-redirect scenarios likesurreal start > app.logno longer strip ANSI from the stream that is still an interactive terminal.[CLI]Prevent panic on systems with restricted/procaccess (e.g. NixOS withProcSubset=pidhardening) wheresysinfocannot read/proc/meminfoandSystem::total_memory()returns 0. The previouscgroup_limits()assertion put the systemd service into an infinite restart loop on both RocksDB and SurrealKV backends.[Events]Fixed events defined on a vertex table incorrectly firing for related edge-table records during cascade deletion. When deleting a vertex with graph edges (viaRELATE), the edge deletes now run with the edge table's document context so the vertex table's events, views, live queries, changefeeds, and field validation are no longer applied to edge-record mutations.
Release v3.0.5
Released on Mar 27, 2026
Bug fixes:
Features & improvements:
Release v3.0.4
Released on Mar 13, 2026
Release v3.0.3
Released on Mar 10, 2026
Bug fixes:
Features & improvements:
Release v3.0.2
Released on Mar 3, 2026
Bug fixes:
Features & improvements:
Release v3.0.1
Released on Feb 24, 2026
Bug fixes:
Release v3.0.0
Released on Feb 17, 2026
After numerous alpha and beta releases over more than a year of development, we are releasing SurrealDB v3.0.0! 🎉. The changes for this release pertain to those over all the alpha and beta versions before 3.0.0, starting with 3.0.0-alpha.1 and the last 3.0.0-beta.4 and finally the changes between the final beta version and stable 3.0.0.
Items in the release notes marked as 🆕 are the newest changes from the final beta and 3.0.0.
To migrate from a 2.x version to 3.0, please see the following page which goes into further detail on the breaking changes and how to use migration diagnostics to obtain a list of actions for your particular schema.
Performance and optimisations:
Features, additions and syntax improvements:
Bug fixes:
Workflow, observability and developer experience improvements:
Storage/index format and protocol:
Security/networking:
Release v2.6.3
Released on Mar 4, 2026
Release v2.6.2
Released on Feb 16, 2026
Release v2.6.1
Released on Feb 12, 2026
Release v2.6.0
Released on Jan 27, 2026
Release v2.5.0
Released on Jan 22, 2026
Features:
Security Advisories:
Note: Storable closures in future fields and functions are now disabled by default for security reasons. To enable the previous behaviour, set the SURREAL_CAPS_ALLOW_INSECURE_STORABLE_CLOSURES environment variable. This change addresses the security vulnerability described in Advisory.
Release v2.4.0
Released on Nov 24, 2025
Features:
Bug fixes:
Breaking changes:
CONTAINS/INSIDE planning made consistent with substring semantics - see language test example in this file with details on using the CONTAINSANY operator with indexes
Release v2.3.10
Released on Sep 19, 2025
Release v2.3.9
Released on Sep 16, 2025
Release v2.3.8
Released on Sep 11, 2025
Bug fixes:
Improvements:
Security advisories:
Release v2.3.7
Released on Jul 9, 2025
Release v2.3.6
Released on Jun 26, 2025
Bug fixes:
Workflow improvements:
Security advisories:
Release v2.3.5
Released on Jun 19, 2025
Release v2.3.4
Released on Jun 16, 2025
Bug fixes:
Workflow improvements:
Release v2.3.3
Released on May 21, 2025
Release v2.3.1
Released on May 7, 2025
This release resolves an issue identified in v2.3.0 that can corrupt the database when an UPDATE statement
is stored within a function. If you experience this issue when migrating to v2.3.0 please kindly remove those
function definitions, upgrade to v2.3.1 and then add them back.
Bug fixes:
Release v2.3.0
Released on May 1, 2025
NB: We identified an issue in this release that can corrupt the database when an UPDATE statement
is stored within a function. We released v2.3.1 to address this. If you defined functions with UPDATE
statements in v2.3.0 please kindly remove those function definitions, upgrade to v2.3.1 and then add them back.
Features:
Bug fixes:
Deprecations:
The following Rust SDK APIs are now deprecated. In addition, some Capabilities methods were renamed and the previous names marked as deprecated.
IntoQuery::into_queryIntoEndpoint::into_endpointIntoFn::into_fnIntoExportDestination::into_export_destinationQueryResult::query_resultQueryResult::statsQueryStream::query_streamIntoResource::into_resourceCreateResource::into_resourceproto::ResponseActionremote::WsNotification
Workflow improvements:
Release v2.2.8
Released on Sep 11, 2025
Bug fix:
Security advisories:
Release v2.2.7
Released on Jul 9, 2025
Release v2.2.6
Released on Jun 26, 2025
Bug fixes:
Workflow improvements:
Security advisories:
Release v2.2.5
Released on Jun 19, 2025
Release v2.2.4
Released on Jun 17, 2025
Release v2.2.3
Released on May 13, 2025
Bug fixes:
[Fixed invalid "*" value for SURREAL_CAPS_[ALLOW_ARBITRARY_QUERY | ALLOW_EXPERIMENTAL]](https://github.com/surrealdb/surrealdb/pull/5890)
Release v2.2.2
Released on Apr 10, 2025
Bug fixes:
Security Advisories:
Release v2.2.1
Released on Feb 18, 2025
Features:
Bug fixes:
Release v2.2.0
Released on Feb 11, 2025
Features:
Bug fixes:
Optimisations:
SurrealKV:
Workflow improvements:
Experimental:
Breaking changes:
Release v2.1.9
Released on Sep 11, 2025
Bug fixes and improvements:
Security advisories:
Release v2.1.8
Released on Jun 26, 2025
Bug fixes:
Workflow improvements:
Security advisories:
Release v2.1.7
Released on Jun 19, 2025
Workflow improvements:
Release v2.1.6
Released on Jun 17, 2025
Release v2.1.5
Released on Apr 10, 2025
Bug fixes:
Security advisories:
Release v2.1.4
Released on Dec 18, 2024
Bug fixes:
Security advisories:
Release v2.1.3
Released on Dec 10, 2024
Release v2.1.2
Released on Nov 26, 2024
Release v2.1.1
Released on Nov 26, 2024
Bug fixes:
SurrealKV:
Workflow improvements:
Release v2.1.0
Released on Nov 21, 2024
Features:
Performance improvements:
Bug fixes:
Workflow improvements:
Features with breaking changes:
Release v2.0.5
Released on Apr 10, 2025
Bug fixes:
Security advisories:
Release v2.0.4
Released on Oct 8, 2024
Performance improvements:
Bug fixes:
Fixed micro second parsing
Workflow improvements:
Security advisories:
Release v2.0.3
Released on Oct 3, 2024
Features:
Parser improvements:
Bug fixes:
Fixed ID type conversion
Fixed thing parsing function
Workflow improvements:
Release v2.0.2
Released on Sep 25, 2024
Bug fixes:
Fixed error message panics
Fixed decimal parsing
Fixed version patching
Fixed CBOR Range encoding
Fixed bug with number ordering
Improvements:
Added DTrace profiling support
Release v2.0.0
Released on Sep 17, 2024
After numerous alpha and beta releases over months of development, we are releasing SurrealDB v2.0.0! 🎉. The changes for this release pertain to those in between the final 2.0.0-beta-3 and other alpha versions.
NOTE: Because of changes in the underlying way SurrealDB stores data, steps are required to migrate to 2.0.0 from previous versions. Please use the following steps for any existing databases:
If you are moving from
1.xto2.x, use thesurreal fixcommand.
Features:
Added
DEFINE ACCESSstatement to grant access to resources.Deprecated
DEFINE SCOPEin favour ofDEFINE ACCESS ... TYPE RECORD.Deprecated
DEFINE TOKENin favour ofDEFINE ACCESS ... TYPE JWT.Deprecated
DEFINE TOKEN ON SCOPEin favour ofDEFINE ACCESS ... TYPE RECORD ... WITH JWT.Added customisable algorithm and key when issuing tokens for records users with the
WITH ISSUERclause.Added customisable token and session duration to
DEFINE USERandDEFINE ACCESS.Removed session expiration when not explicitly defined.
Changed the
INFOstatement to redact secrets defined viaDEFINE ACCESS.Changed HTTP request headers expected by SurrealDB to require the
surreal-prefix.Removed the
--authflag in the CLI to enable it by default. Added--unauthenticated.Removed the
--enable-auth-levelflag in CLI to enable the behaviour by default. Defaults to root.Changed authentication to expect level via the
--auth-levelflag orsurreal-auth-*headers.Changed the default
--bindaddress in the CLI from0.0.0.0to127.0.0.1.Added the
--no-identification-headersflag in the CLI to limit information leakage.Added
type::rangefunction.Added
TEMPFILESclause to theSELECTstatement.Introduce resource creation checks for
DEFINEstatement to avoid duplicates.Added string functions for IP
string::is::ip,string::is::ipv4,string::is::ipv6.Introduce resource creation checks for
DEFINEstatement to avoid duplicates.Added string functions for IP
string::is::ip,string::is::ipv4,string::is::ipv6.Added string functions for HTML:
string::html::encode,string::html::sanitize.Added new math functions:
math::acos,math::acot,math::asin,math::atan,math::clamp,math::cos,math::cot,math::deg2rad,math::lerp,math::lerpangle,math::ln,math::log,math::log2,math::log10,math::rad2deg,math::sign,math::sin,math::tan.Support batch import with
INSERTstatement. This also extends to relationships between tables using theINSERT RELATIONstatementImproved HNSW persistence
Added Range value support
Added ability to SELECT with version, CREATE with version and INSERT with version on SurrealKV
Added ENFORCED keyword to DEFINE TABLE
SCHEMAFULL tables are now TYPE NORMAL by default
Added literal types to the query language
Added the .chain() method
Added typed LET statements
Added typed function returns
Added record::exists() function
Added new functions
value::diff()andvalue:::patch()Array function changes and additions:
array::all(),array::any(),array::filter_index(),array::find_index()functions can now take a value or a closure. Also addedarray::filter()andarray::find()functions.Upgraded SurrealKV to v0.3
More flexible create API for Rust SDK
Indexing operators can now take expressions
Support for mixed number types on range queries
time::epoch constant now available
Method call syntax now works on integers
Improved GraphQL record fetching
Added
ALTER TABLEstatementMoved
AUTHENTICATEclause to the root ofDEFINE ACCESSstatement to allow the clause to be used in every access methodAdded
OVERWRITEclause for defined resourcesAdded
array::windows()functionAdded
string::is::recordfunctionAdded anonymous functions
Added typed function returns
Function return types now shown in
INFOstatementType
anycan now act as an optional typeAdded
time::is::leap_year()functionAdded environment variables to configure HTTP endpoint limits & JavaScript runtime limits
Introduced savepoint capabilities
Performance improvements:
Improvements to node membership processing and garbage collection
Improvements to select count table scan
Stabilise and use
parser2for parsing.KNN filtering with limit and KNN distance function.
Bug fixes:
Connection ID now stored inside session data
Fixed remote fields added to output result inside SELECT * queries
Fixed GHSA-gh9f-6xm2-c4j2: Improper Authentication when Changing Databases as Scope User
Fixes to issues with composite indexes
Fixed Redefining HNSW index error.
Fixed polygon serialisation.
Ensured the server shuts down properly
Removed unneeded return in matching
Disabled default audience validation for JWKS
Removed panic on invalid range scan
Added
tableto reserved keywordsConcurrent indexing no longer fails if record updated during build
Unreachable code now returns an error
DEFINE EVENTdefaults totruewhen no WHEN clause specifiedFixed bug in which
NONEandNULLboth < 1 and > 1Createon rpc which returned an array now returns an object. Similar change made to Rust SDKFixed GHSA-64f8-pjgr-9wmr: Untrusted Query Object Evaluation in RPC API
Fixed importing from
1.xDeprecated missing format inference on RPC protocol
Workflow improvements:
Added
surreal fixcommandImproved parser error type
Added Support for SurrealCS
Bumped async graphql version
Improved transparent API
API improvements:
Surrealkv API improvements:
Parser improvements:
Ensured UUIDs are parsed correctly
Breaking changes:
Functions
string::endsWith()andstring::startsWith()renamed tostring::ends_with()andstring::starts_with()Changed
UPDATEstatement behaviour of creating records in favour of newUPSERTstatement.
Experimental features:
Release v1.5.6
Released on Nov 12, 2024
Release v1.5.5
Released on Sep 11, 2024
Bug fixes:
Fixed GHSA-64f8-pjgr-9wmr: Untrusted Query Object Evaluation in RPC API
Release v1.5.4
Released on Jul 10, 2024
Bug fixes:
Fixed GHSA-gh9f-6xm2-c4j2: Improper Authentication when Changing Databases as Scope User
Release v1.5.3
Released on Jun 14, 2024
Release v1.5.2
Released on Jun 6, 2024
Bug fixes:
Fixed incorrect computations on aggregations within foreign tables
Fixed
surreal upgrade --nightly
Release v1.5.1
Released on May 23, 2024
Bug fixes:
Make temporary table active only if the temporary directory is set
Fixes compilation issue related to temporary-directory when the feature sql2 is not enabled
Release v1.5.0
Released on May 14, 2024
Features:
Added an implementation of HNSW in memory.
Added a
REBUILD INDEXstatement.Added variable support in
CONTENTclause forRELATEstatements.Added more information to
INFO FOR SCOPE.Added a relate method to the RPC protocol.
Added an
INFO STRUCTUREstatement.Stabilised
sql2andjwksfeatures.Introduced an on-disk temporary table.
Added a run method to the RPC protocol.
Implemented limits for parsing depth in the new parser.
Implemented reblessive into the parser to prevent any overflows.
Increased the Minimum Supported Rust Version (MSRV) to 1.77.
Bug fixes:
Made the query planner recognise the exact operator (
==).Fixed
math:minin foreign tables.Fixed typo in function
math:sum: wasmath::sun.Made record IDs more flexible in the new parser.
Reverted changefeed polling frequency back to 10 seconds.
Fixed a problem with date-time parsing.
Fixed response content-type on
/rpcendpoint.Fixed decimal decoding.
Made the query planner support the IN operator.
Made the JWKS implementation more RFC 7517 compliant.
Fixed wrong count when using
COUNTwith a subquery.Fixed the content type header on a CBOR HTTP response.
Fixed
$valuebeingNONEforDELETEevents.Fixed
array::groupin a group by query.
Performance improvements:
Added a query planner strategy for record links.
Made
TreeCachemore efficient on writes.Reduced byte size of datetime and UUID types using CBOR format.
Release v1.4.2
Released on Apr 20, 2024
Bug fixes:
Fix problems with if in identifiers after remove and define statements.
Fix $value being NONE for DELETE events.
Fix CBOR headers.
Fix wrong count when using COUNT with a subquery.
Fix IN operator should be recognised by the query planner.
Fix response content-type on /rpc endpoint.
Fix problems with if in identifiers after remove and define statements.
Fix $value being NONE for DELETE events.
Fix CBOR headers
Fix wrong count when using COUNT with a subquery
Fix IN operator should be recognised by the query planner
Fix response content-type on /rpc endpoint
When using the Rust SDK, make sure surrealdb-core is up-to-date. If not, you might get back Revision errors as a result.
Release v1.4.0
Released on Apr 9, 2024
Features:
Added a warning message about debug builds in CLI start.
Moved JWKS cache storage to memory.
Overhauled force implementation.
Added
DEFINE TABLE ... RELATION.Allowed RPC calls to be made over an HTTP connection, not just WebSocket.
Allowed the highlighter to only highlight the matching searched token rather than the whole term.
Added an
INCLUDE ORIGINALoption to change-feeds.Added an
insertmethod to the Rust SDK to allow bulk inserts.
Bug fixes:
Fixed export generating unparsable code with the new parser.
Eliminated a potential panic in MsgPack format implementation.
Fixed
string::is::longitudeRegEx.Improved CBOR decoding.
Fixed relation type parsing.
Fixed handling of empty array on index.
Allowed legacy headers in CORS.
Allowed
surreal upgradeto detect when upgrading to the same version and return early.Fixed certain environment variables to allow configuration at runtime.
Reduced the byte size of datetime and uuid types using CBOR format.
Fixed
array::groupin a group by query.
Performance improvements:
Improved query aggregation handling.
Bulk insert support in the Rust SDK
This was one of the frequently requested features. While this was already possible using the query
method, this release adds an insert method that makes it more convenient.
Release v1.3.1
Released on Mar 15, 2024
Bug fixes:
Add JWT ID claim to tokens issued by SurrealDB.
Consistently enforce session expiration.
Release v1.3.0
Released on Mar 12, 2024
Features:
Introduced
IF NOT EXISTSclause onDEFINEstatements.Implemented
IF EXISTSfor additionalREMOVEstatements.Changed the KNN operator from
<2>to<|2|>in the new parser and added support in the old parser for the new syntax.Implemented WebSocket session expiration.
Added support for tables and geometries in CBOR.
Added support for parsing decimal numbers with scientific notation.
Added support for printing a warning in the CLI when using an outdated version of SurrealDB.
Added
Surreal::wait_forto make it possible for the client to wait for certain events.Added SurrealKV as an unstable feature.
Added more error message improvements for the new parser.
Bug fixes:
More consistent handling of negative numbers in record IDs.
Removed the unimplemented
backupcommand from the CLI.Fixed document not being available to delete permissions clause.
Ensured objects properties are recognised by the query planner.
Implemented the union strategy on unique indexes.
Performance improvements:
Added compile-time feature for flamegraph and pprof profiling.
IF NOT EXISTS clause on DEFINE statements
DEFINE statements now allow you to include an IF NOT EXISTS clause which ensures that the define statement is only run if the resource doesn't already exist. If it exists, you will get an error. Learn more about this in the documentation.
New KNN syntax
The KNN operator now supports a new syntax using <| and |> instead of < and >. Learn more about this in the documentation
Waiting for client events
It's now possible to initialise the connection and run setup actions like authentication and selecting the database concurrently with other queries by making it possible to wait for the SDK to connect or select the database to use before allowing other queries to execute.
Something like this would be susceptible to a race condition before:
Now it's possible to make the client wait for either the connection to be established
or the database to be selected.
Release v1.2.2
Released on Mar 7, 2024
Bug fixes:
Ensure relevant indexes are triggered when using IN in a SELECT query.
Ensure the query planner accepts
DatetimeandUuidvalues.Restore cosine distance on MTree indexes.
Fix regression in index data serialisation.
Ensure
rquickjsbuilds don't stall on macOS.
Release v1.2.1
Released on Feb 16, 2024
Bug fixes:
Fix an issue with
WHEREclause on queries resolving record links or graph edges.Fix MATH::SQRT_2 not parsing.
Fix a panic in span rendering.
Fix CLI output not displaying properly sometimes.
Release v1.2.0
Released on Feb 13, 2024
Features:
Bump MSRV to 1.75.
In-memory index store.
Show execution time in CLI.
knn brute force.
Implement support for remote JSON Web Key Sets.
Add support for
LIVE SELECTin the SDK and CLI.Add
IF EXISTStoREMOVE TABLEstatement.Add
READONLYkeyword toDEFINE FIELDstatement.Add alias
-Vand--versionflags forsurreal versioncommand.Define types for subfields when defining array fields.
Add
string::semver::compare,string::semver::major,string::semver::minor,string::semver::patch,string::semver::inc::major,string::semver::inc::minor,string::semver::inc::patch,string::semver::set::major,string::semver::set::minor,string::semver::set::patchmethods.
Bug fixes:
Make record id string parsing never fail early.
Prevent overflow in
math::power().Fix error message pointing to wrong character.
Respect alias for dynamic field queries with type::field.
Remove min/1000 in
tx:delp.Replace custom JWT parser causing decoding issues.
Issue with scoring on complex queries.
Limit recursion depth when parsing nested RELATE statements.
Fix a bug where a non-empty list parser would parse empty lists.
Ensure an attempt to set a protected variable returns an error.
Fix duration addition in timeout causing overflow.
Panic invoking parameters and functions without a database.
Fix a bug where the kind parser would eat whitespace.
Fix WebSocket notification sending format.
Implement missing errors for missing clauses on DEFINE-statements.
Ensure advanced
DEFINE PARAMparameters are computed correctly.Ensure path idioms are correct when looping over.
Fix json failing to parse with trailing whitespace.
Fix the five second delay in Wasm after initial connection.
Add context to live query notifications.
Fix the modulo operator on sql2 and parser1.
Improve the js-surql value conversion for numbers.
Implement revision types for client/server communication.
Fix builtin error pointing to the wrong part.
Fix a panic when invalid builtin function names are passed to the executor.
Performance improvements:
Ensure compression is only enabled when response is a certain size.
In MTree large vector improvement.
Use JWKS to dynamically configure your token definitions
Define a READONLY field
Define types for subfields when defining array fields
Release v1.1.1
Released on Jan 16, 2024
Bug fixes:
Fix WebSocket notification sending format.
Fix missing custom claims from token parameter.
Fix URL encoding in JS functions.
Fix panic when invoking parameters and functions without a database.
Release v1.1.0
Released on Jan 9, 2024
Features:
The
type::is::record()function now accepts a second optional table argument, validating the record being stored on the passed table.Add
time::micros(),time::millis()andtime::from::nanosfunctions.Add
type::is::none()function.Add
object::entries(),object::from_entries(),object::len(),object::keys()andobject::values()functions.Clean paths in the start command and honour
~.CLI: Split results by comment.
Add
surreal sqlwelcome message.Add Debugging env flag:
SURREAL_INSECURE_FORWARD_SCOPE_ERRORS.Add
SURREAL_ROCKSDB_KEEP_LOG_FILE_NUMenvironment variable (default 20).Support auth levels for basic auth (behind feature flag)
Add remainder/modulo operator.
Implement string prefixes:
s,r,dandu.Add ability to cast string to a Thing/Record ID.
Analyzers to support functions.
Support of subfields for embedding indexing.
Add live query API to Rust SDK.
Add
Query::with_stats()to return query statistics along with the results.Permissions are now always displayed for visibility
Add a
--betaflag tosurreal upgradeto make installing the latest beta release easier.
Bug fixes:
Fix stack overflow in graph traversal.
Bugfix - parse error for invalid leading whitespace.
Fix memory leak caused by OTEL callbacks.
Fix wrong function name export and function name parsing.
The position of the
LIMITandORDERclauses are now interchangeable.Fix index plan for idiom param value.
Fix bug where error offset could underflow.
Query results should be consistent and representative.
Indexes used with the operators
CONTAINS [ ANY | ALL ].Forward custom thrown errors in
SIGNINandSIGNUPqueries.Fix
ORDER BY RAND()failing to parse when selecting specific fields.Fix identifiers which look like numbers failing to parse.
Change math::median indexing for even length arrays.
Pass IP & Origin onto session used by scope queries.
Fix possible corruption of MTree and incomplete knn.
Allow
array::flatten()to be used as an aggregate function.Make
SELECT ONLYdeterministic.Optional function arguments should be optional.
Default table permissions should be
NONEBugfix: Fix inconsistent record parsing
Fix time regression in
surrealdb.wasmbinaries.Fix computing futures in query conditions.
Fix issue with scoring on complex queries.
Fix ML support on Windows and enable the feature in Windows binaries.
Replace the custom JWT parser causing decoding issues.
Ensure compression is only enabled when response is a certain size.
Respect alias for dynamic field queries with
type::field().Prevent overflow in
math::power().Fix error message pointing to wrong character.
Expand logic for static value validation to improve
DEFAULTclause handling.Fallback to a string when record ID parsing fails.
Ensure an attempt to set a protected variable returns an error.
Fix duration addition in timeout causing overflow.
Fix a bug where a non-empty list parser would parse empty lists.
Limit recursion depth when parsing nested
RELATEstatements.Ensure
REMOVEstatement does not only remove the first 1000 keys.Fix BTree deletion bug.
Replace close method on
live::Streamwith a Drop trait implementation.
Performance improvements:
Enable compression on the HTTP connector.
Make
REMOVE [ TABLE | DATABASE | NAMESPACE ]faster for TiKV and FoundationDB.Repetitive expressions and idioms are no longer re-evaluated.
Improve performance of
CREATEstatements, and record insertion.Improve RocksDB performance and configuration, introducing
SURREAL_ROCKSDB_THREAD_COUNT,SURREAL_ROCKSDB_WRITE_BUFFER_SIZE,SURREAL_ROCKSDB_TARGET_FILE_SIZE_BASE,SURREAL_ROCKSDB_MAX_WRITE_BUFFER_NUMBER,SURREAL_ROCKSDB_MIN_WRITE_BUFFER_NUMBER_TO_MERGE,SURREAL_ROCKSDB_ENABLE_PIPELINED_WRITES,SURREAL_ROCKSDB_ENABLE_BLOB_FILES,SURREAL_ROCKSDB_MIN_BLOB_SIZEenvironment variables.Improve SpeeDB performance and configuration, introducing
SURREAL_SPEEDB_THREAD_COUNT,SURREAL_SPEEDB_WRITE_BUFFER_SIZE,SURREAL_SPEEDB_TARGET_FILE_SIZE_BASE,SURREAL_SPEEDB_MAX_WRITE_BUFFER_NUMBER,SURREAL_SPEEDB_MIN_WRITE_BUFFER_NUMBER_TO_MERGE,SURREAL_SPEEDB_ENABLE_PIPELINED_WRITES,SURREAL_SPEEDB_ENABLE_BLOB_FILES,SURREAL_SPEEDB_MIN_BLOB_SIZEenvironment variables.Improve WebSocket performance, introduce
SURREAL_WEBSOCKET_MAX_FRAME_SIZE,SURREAL_WEBSOCKET_MAX_MESSAGE_SIZE,SURREAL_WEBSOCKET_MAX_CONCURRENT_REQUESTSenvironment variables.Use specific memory allocators depending on OS.
Fix memory leak in WebSocket implementation.
The
type::is::record()function now accepts a second optional table argument, validating the record being - stored on the passed table.Add
time::micros(),time::millis()andtime::from::nanosfunctions.Add
type::is::none()function.Add
object::entries(),object::from_entries(),object::len(),object::keys- ()andobject::values()functions.Clean paths in the start command and honour
~.CLI: Split results by comment.
Add
surreal sqlwelcome message.Add Debugging env flag:
SURREAL_INSECURE_FORWARD_SCOPE_ERRORS.Add
SURREAL_ROCKSDB_KEEP_LOG_FILE_NUMenvironment variable (default 20).Support auth levels for basic auth (behind feature flag)
Add remainder/modulo operator.
Implement string prefixes:
s,r,dandu.Add ability to cast string to a Thing/Record ID.
Analyzers to support functions.
Support of subfields for embedding indexing.
Add live query API to Rust SDK.
Add
Query::with_stats()to return query statistics along with the results.Permissions are now always displayed for visiblity
Add a
--betaflag tosurreal upgradeto make installing the latest beta release easier.
Bug fixes:
Fix stack overflow in graph traversal.
Bugfix - parse error for invalid leading whitespace.
Fix memory leak caused by OTEL callbacks.
Fix wrong function name export and function name parsing.
The position of the
LIMITandORDERclauses are now interchangable.Fix index plan for idiom param value.
Fix bug where error offset could underflow.
Query results should be consistent and representative.
Indexes used with the operators
CONTAINS [ ANY | ALL ].Forward custom thrown errors in
SIGNINandSIGNUPqueries.Fix
ORDER BY RAND()failing to parse when selecting specific fields.Fix identifiers which look like numbers failing to parse.
Change math::median indexing for even length arrays.
Pass IP & Origin onto session used by scope queries.
Fix possible corruption of MTree and incomplete knn.
Allow
array::flatten()to be used as an aggregate function.Make
SELECT ONLYdeterministic.Optional function arguments should be optional.
Default table permissions should be
NONEBugfix: Fix inconsistant record parsing
Fix time regression in
surrealdb.wasmbinaries.Fix computing futures in query conditions.
Fix issue with scoring on complex queries.
Fix ML support on Windows and enable the feature in Windows binaries.
Replace the custom JWT parser causing decoding issues.
Ensure compression is only enabled when response is a certain size.
Respect alias for dynamic field queries with
type::field().Prevent overflow in
math::power().Fix error message pointing to wrong character.
Expand logic for static value validation to improve
DEFAULTclause handling.Fallback to a string when record ID parsing fails.
Ensure an attempt to set a protected variable returns an error.
Fix duration addition in timeout causing overflow.
Fix a bug where a non-empty list parser would parse empty lists.
Limit recursion depth when parsing nested
RELATEstatements.Ensure
REMOVEstatement does not only remove the first 1000 keys.Fix BTree deletion bug.
Replace close method on
live::Streamwith a Drop trait implementation.
Performance improvements:
Enable compression on the HTTP connector.
Make
REMOVE [ TABLE | DATABASE | NAMESPACE ]faster for TiKV and FoundationDB.Repetitive expressions and idioms are not anymore re-evaluated.
Improve performance of
CREATEstatements, and record insertion.Improve RocksDB performance and configuration, introducing
SURREAL_ROCKSDB_THREAD_COUNT,SURREAL_ROCKSDB_WRITE_BUFFER_SIZE,SURREAL_ROCKSDB_TARGET_FILE_SIZE_BASE,SURREAL_ROCKSDB_MAX_WRITE_BUFFER_NUMBER,SURREAL_ROCKSDB_MIN_WRITE_BUFFER_NUMBER_TO_MERGE,SURREAL_ROCKSDB_ENABLE_PIPELINED_WRITES,SURREAL_ROCKSDB_ENABLE_BLOB_FILES,SURREAL_ROCKSDB_MIN_BLOB_SIZEenvironment variables.Improve SpeeDB performance and configuration, introducing
SURREAL_SPEEDB_THREAD_COUNT,SURREAL_SPEEDB_WRITE_BUFFER_SIZE,SURREAL_SPEEDB_TARGET_FILE_SIZE_BASE,SURREAL_SPEEDB_MAX_WRITE_BUFFER_NUMBER,SURREAL_SPEEDB_MIN_WRITE_BUFFER_NUMBER_TO_MERGE,SURREAL_SPEEDB_ENABLE_PIPELINED_WRITES,SURREAL_SPEEDB_ENABLE_BLOB_FILES,SURREAL_SPEEDB_MIN_BLOB_SIZEenvironment variables.Improve WebSocket performance, introduce
SURREAL_WEBSOCKET_MAX_FRAME_SIZE,SURREAL_WEBSOCKET_MAX_MESSAGE_SIZE,SURREAL_WEBSOCKET_MAX_CONCURRENT_REQUESTSenvironment variables.Use specific memory allocators depending on OS.
Fix memory leak in Websocket implementation.
Get realtime updates in your Rust application with the Live Query API
v1.1.0 introduces a new Live Query API to the Rust SDK, for powerful realtime updates in your Rust applications.
Object functions
It was previously impossible to iterate over objects, so we introduced some new functions to make working with object data structures easier.
String prefixes
Strings can optimistically be parsed as Record IDs, Datetimes or as a UUID, if the content matches such a value. With string prefixes you get to decide what value a string holds.
Deterministic SELECT ONLY
The ONLY clause is sometimes not deterministic. Selecting from an array, table or range with the ONLY clause now requires you to limit the result to 1.
Optional function arguments
Optional function arguments on custom functions are now actually optional.
Release v1.0.2
Released on Dec 21, 2023
Bug fixes:
Support connecting to beta servers from the Rust SDK.
Release v1.0.1
Released on Dec 14, 2023
Bug fixes:
Add a patch for GHSA-x5fr-7hhj-34j3.
Tables defined without explicit permissions have NONE instead of FULL permissions.
Table permissions are always explicitly displayed with the INFO FOR DB statement.
Release v1.0.0
Released on Sep 13, 2023
After numerous beta releases crammed into just months of development, we are releasing SurrealDB v1.0.0! 🎉
Here follow some of our 1.0.0 highlights:
Introducing new type validation methods in SurrealQL
v1.0.0 introduces new type validation methods. These new methods allow you to check which type any sort of value is on the go.
Guaranteed single item results with the new ONLY keyword
It was previously difficult to select, create, update or delete just a single record, so we simplified it a bit.
Get realtime updates in your application with SurrealDB Live Queries
v1.0.0 introduces Live Queries. This powerful technology allows you to write applications where you can serve realtime updates to your frontend.
Efficiently index and search your data with SurrealDB Full Text Search
With Full Text Search, you can efficiently store and index data, and search through it.
Allow or deny capabilities when starting your SurrealDB instance
All capabilities are disabled by default. This means that by default, you are not able to use any methods, embedded scripting functions, make outbound network calls, or access the database anonymously. Down below follows a set of examples to showcase how one can configure capabilities.
Capabilities are further documented in the Capabilities documentation.
Revamped root users
It is now possible to define multiple root users in SurrealDB. This change did require some changes in the way that you start your database, however.
With this change, you will now only initially have to provide the --user and --pass flags to create the initial root user, but once the first root user exists, they will no longer be utilised.
For more information, check out the Authentication guide, and the surreal start and DEFINE USER documentation.
Strict typing in SurrealQL
v1.0.0 introduces a more strict and powerful typing system. It makes things more simple to understand, and it goes a long way in preventing all kinds of weird bugs in your schemas!
Set a DEFAULT value on field definitions
PERMISSIONS on global parameters and custom functions
Scope and anonymous users previously had access to every defined global parameter and function. You can now define these resources with a PERMISSIONS clause to protect them.
FOR, BREAK and CONTINUE statements
THROW statement
Did something unexpected happen, and do you want to throw an error to the client? Now you can!
COMMENT away on resource definitions!
Less bulky IF ELSE statements
We found the IF ELSE statement to be a bit bulky at times. Now, when you use a block ({}) as the body of the statement, you can skip out on the THEN and END keywords!
More features for our embedded scripting functions
With fetch(), query(), value() and basically every SurrealQL function now being available within the embedded scripting functions, they are a very powerful extension to SurrealQL, and can be used to solve complex problems otherwise impossible!
Read more about them in the Embedded scripting functions documentation.
Support for FLEXIBLE fields on SCHEMAFULL tables
SCHEMAFULL and SCHEMALESS functionality can now be used together, suitable for capturing schema-free log data.
Support code blocks and advanced expressions
It is now possible to run blocks of code, with support for an arbitrary number of statements, including LET and RETURN statements. This allows for writing advanced custom logic, and allowing for more complicated handling of data operations.
Define custom functions with DEFINE FUNCTION statements
SurrealDB now supports the ability to define global database-wide custom functions, which allow for complicated or repeated user-defined code, to be run seamlessly within any query across the database. Custom functions support typed arguments, and multiple nested queries with custom logic.
Release v0.3.0
Released on Dec 14, 2021
Features:
Enable query and session parameters to be defined on a JSON-RPC connection
Ensure subqueries can access encoding parent query and grand-parent queries
Add diff-match-patch functionality when updating document records
Separate authentication levels for Namespace and Database specific access
Authentication scope definition and setup, with user-defined authentication logic for each scope
Pre-defined aggregate analytics views
Aggregate views let you pre-compute analytics queries as data is written to SurrealDB. Similarly to an index, a table view lets you select, aggregate, group, and order data, with support for moving averages, time-based windowing, and attribute-based counting. Pre-defined aggregate views are efficient and performant, with only a single record modification being made for every write.
Release v0.2.0
Released on Jan 21, 2021
Features:
Parameters can be used to store values or result sets
Nested subquery functionality, with scoped parameters
Nested field query notation allowing nested arrays and objects to be queried
Mathematical operators for complex mathematical calculations in queries
Advanced functions for working with arrays, strings, time, validation, parsing, and counting
Release v0.1.0
Released on Dec 8, 2019
Features:
Multi-tenancy data separation, with namespaces and databases
Schemafull or schemaless tables with limitless document fields
Multi-table, multi-row, serialisable ACID transactions
Table fields, table change events, table indexes, and data constraints
Advanced data model including empty values, strings, numbers, objects, arrays, durations, and datetimes
