---
title: "Release 1.1 | SurrealDB"
description: "Bug fixes: Fix WebSocket notification sending format. Fix missing custom claims from token parameter. Fix URL encoding in JS functions. Fix panic when invoking…"
url: https://surrealdb.com/releases/1.1
---

# SurrealDB 1.1

[Latest patch: 1.1.1](https://surrealdb.com/releases/1.1#release-1-1-1) [All releases](https://surrealdb.com/releases)

**Patches.** 2 patch releases on the 1.1 line.

**Latest.** 1.1.1, released Jan 16, 2024.

**Stable.** Ready for production, with every patch's notes below.

1. ![Babcock](https://surrealdb.com/assets/static/babcock.lo4rnVg1.svg)
2. ![ING](https://surrealdb.com/assets/static/ing.X3I6S3_V.svg)
3. ![British Airways](https://surrealdb.com/assets/static/british-airways.KEsZiwV-.svg)
4. ![Nvidia](https://surrealdb.com/assets/static/nvidia.DaIEuMil.svg)
5. ![Apple](https://surrealdb.com/assets/static/apple.D5pq4flY.svg)
6. ![SpaceX](https://surrealdb.com/assets/static/spacex.CQJEk-IL.svg)
7. ![Samsung](https://surrealdb.com/assets/static/samsung.CH-vQgnb.svg)
8. ![adidas](https://surrealdb.com/assets/static/adidas.DdTC5qhk.svg)
9. ![Tencent](https://surrealdb.com/assets/static/tencent.paQmLxyy.svg)
10. ![Alibaba](https://surrealdb.com/assets/static/alibaba.B16idgfM.svg)
11. ![PolyAI](https://surrealdb.com/assets/static/poly-ai.c3w_fAg6.svg)
12. ![Later](https://surrealdb.com/assets/static/later.Ds736jFO.svg)
13. ![Verizon](https://surrealdb.com/assets/static/verizon.BI7CajdX.svg)
14. ![Liberty Mutual](https://surrealdb.com/assets/static/liberty-mutual.B7qOU1pd.svg)
15. ![Walmart](https://surrealdb.com/assets/static/walmart.BjDg_Sr8.svg)
16. ![Carrier](https://surrealdb.com/assets/static/carrier.D21gC6NX.svg)
17. ![Saks Fifth Avenue](https://surrealdb.com/assets/static/saks-fifth-avenue.COIDpLSb.svg)
18. ![San Francisco Compute Company](https://surrealdb.com/assets/static/sfcc.B7jlImq4.svg)
19. ![Shield AI](https://surrealdb.com/assets/static/shield-ai.pINZ0KJr.svg)
20. ![Wix](https://surrealdb.com/assets/static/wix.DvHhmoBi.svg)

Back to top

[Version 1.1.1](https://surrealdb.com/releases/1.1#release-1-1-1)

[Version 1.1.0](https://surrealdb.com/releases/1.1#release-1-1-0)

[Home](https://surrealdb.com/)

[Releases](https://surrealdb.com/releases)

1.1

Bug fixes: Fix WebSocket notification sending format. Fix missing custom claims from token parameter. Fix URL encoding in JS functions. Fix panic when invoking…

[Newer release line available: 1.2 →](https://surrealdb.com/releases/1.2)

Released Jan 16, 2024

## 1.1.1

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.

Upgrade or install

## Get SurrealDB v1.1.1

Pick how you want to install or upgrade. SurrealDB Studio can update connected instances in place, or choose a platform below to copy a CLI command for v1.1.1.

SurrealDB Cloud

macOS

Linux

Windows

Docker

Already installed

You can upgrade your SurrealDB Cloud instance to v1.1.1 effortlessly through SurrealDB Studio.

1. Open the [SurrealDB Studio](https://studio.surrealdb.com/current/instances)
2. Select your organisation and instance
3. On the dashboard, click on the "Upgrade" button
4. Your instance will be updated and restarted automatically

[Full install guide](https://surrealdb.com/surrealdb/install)

Released Jan 9, 2024

## 1.1.0

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()` and `time::from::nanos` functions.
- Add `type::is::none()` function.
- Add `object::entries()`, `object::from_entries()`, `object::len()`, `object::keys()` and `object::values()` functions.
- Clean paths in the start command and honour `~`.
- CLI: Split results by comment.
- Add `surreal sql` welcome message.
- Add Debugging env flag: `SURREAL_INSECURE_FORWARD_SCOPE_ERRORS`.
- Add `SURREAL_ROCKSDB_KEEP_LOG_FILE_NUM` environment variable (default 20).
- Support auth levels for basic auth (behind feature flag)
- Add remainder/modulo operator.
- Implement string prefixes: `s`, `r`, `d` and `u`.
- 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 `--beta` flag to `surreal upgrade` to 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 `LIMIT` and `ORDER` clauses 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 `SIGNIN` and `SIGNUP` queries.
- 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 ONLY` deterministic.
- Optional function arguments should be optional.
- Default table permissions should be `NONE`
- Bugfix: Fix inconsistent record parsing
- Fix time regression in `surrealdb.wasm` binaries.
- 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 `DEFAULT` clause 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 `RELATE` statements.
- Ensure `REMOVE` statement does not only remove the first 1000 keys.
- Fix BTree deletion bug.
- Replace close method on `live::Stream` with 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 `CREATE` statements, 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_SIZE` environment 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_SIZE` environment variables.
- Improve WebSocket performance, introduce `SURREAL_WEBSOCKET_MAX_FRAME_SIZE`, `SURREAL_WEBSOCKET_MAX_MESSAGE_SIZE`, `SURREAL_WEBSOCKET_MAX_CONCURRENT_REQUESTS` environment 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()` and `time::from::nanos` functions.
- Add `type::is::none()` function.
- Add `object::entries()`, `object::from_entries()`, `object::len()`, `object::keys- ()` and `object::values()` functions.
- Clean paths in the start command and honour `~`.
- CLI: Split results by comment.
- Add `surreal sql` welcome message.
- Add Debugging env flag: `SURREAL_INSECURE_FORWARD_SCOPE_ERRORS`.
- Add `SURREAL_ROCKSDB_KEEP_LOG_FILE_NUM` environment variable (default 20).
- Support auth levels for basic auth (behind feature flag)
- Add remainder/modulo operator.
- Implement string prefixes: `s`, `r`, `d` and `u`.
- 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 `--beta` flag to `surreal upgrade` to 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 `LIMIT` and `ORDER` clauses 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 `SIGNIN` and `SIGNUP` queries.
- 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 ONLY` deterministic.
- Optional function arguments should be optional.
- Default table permissions should be `NONE`
- Bugfix: Fix inconsistent record parsing
- Fix time regression in `surrealdb.wasm` binaries.
- 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 `DEFAULT` clause 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 `RELATE` statements.
- Ensure `REMOVE` statement does not only remove the first 1000 keys.
- Fix BTree deletion bug.
- Replace close method on `live::Stream` with 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 `CREATE` statements, 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_SIZE` environment 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_SIZE` environment variables.
- Improve WebSocket performance, introduce `SURREAL_WEBSOCKET_MAX_FRAME_SIZE`, `SURREAL_WEBSOCKET_MAX_MESSAGE_SIZE`, `SURREAL_WEBSOCKET_MAX_CONCURRENT_REQUESTS` environment 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.

```rust
// Select the namespace/database to use
db.use_ns("namespace").use_db("database").await?;

// Listen to all updates on a table
let mut stream = db.select("person").live().await?;

// Listen to updates on a range of records
let mut stream = db.select("person").range("jane".."john").live().await?;

// Listen to updates on a specific record
let mut stream = db.select(("person", "h5wxrf2ewk8xjxosxtyc")).live().await?;

// The returned stream implements `futures::Stream` so we can
// use it with `futures::StreamExt`, for example.
while let Some(result) = stream.next().await {
  handle(result);
}

// Handle the result of the live query notification
fn handle(result: Result<Notification<Person>>) {
  match result {
    Ok(notification) => println!("{notification:?}"),
    Err(error) => eprintln!("{error}"),
  }
}
```

### Object functions

It was previously impossible to iterate over objects, so we introduced some new functions to make working with object data structures easier.

```surql
LET $fruits = {
  apple: {
    name: "Apple",
    stock: 20,
  },
  banana: {
    name: "Banana",
    stock: 40,
  },
};

LET $num_fruit_types = object::len($fruits);
LET $num_fruit_total = math::sum((
  SELECT VALUE stock FROM object::values($fruits)
));

RETURN "We have " + <string> $num_fruit_types + " type of fruits.";
RETURN "We have " + <string> $num_fruit_total + " pieces of fruit in total.";
```

### 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.

```surql
-- Interpreted as a record ID, because of the structure with the semicolon:
RETURN "5:20";
-- Forcefully parsed as just a string
RETURN s"5:20";

-- This will be a record ID.
RETURN r"person:john";
-- This fails, as it's not a valid record ID.
RETURN r"I am not a record ID";

-- Example for a date and a UUID.
RETURN d"2023-11-28T11:41:20.262Z";
RETURN u"8c54161f-d4fe-4a74-9409-ed1e137040c1";
```

### 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`.

```surql
-- Fails, not limited to 1 result and result can contain multiple outputs.
SELECT * FROM ONLY table_name;

-- Works! Resource gets returned, or NONE if no resource was found.
SELECT * FROM ONLY table_name LIMIT 1;
```

### Optional function arguments

Optional function arguments on custom functions are now actually optional.

```surql
DEFINE FUNCTION fn::create::resource($required: string, $optional: option<string>) {
  // The $required argument is a string
  // The $optional argument is a string or NONE
};

// Previously you needed to pass NONE for optional arguments
fn::create::resource("Required argument", NONE);

// Now you simply omit the argument
fn::create::resource("Required argument");
```

Newer patch available

## Upgrade to 1.1.1

You are viewing the 1.1.0 changelog. A newer patch in this release line is available - we recommend running 1.1.1 for the latest fixes and improvements.

[View 1.1.1 release notes](https://surrealdb.com/releases/1.1#release-1-1-1)

Newer release line

### [1.2](https://surrealdb.com/releases/1.2)

Updated Mar 7, 2024

Older release line

### [1.0](https://surrealdb.com/releases/1.0)

Updated Dec 21, 2023

[All releases](https://surrealdb.com/releases)

GET STARTED

## Start building with SurrealDB. One data layer for AI, from object storage to agent memory.

[Start free with SurrealDB](https://studio.surrealdb.com/current/instances/deploy) [Learn more](https://surrealdb.com/docs/what-is-surrealdb)

![ISO 27001](https://surrealdb.com/assets/static/iso.BzQy4FFy.svg)

![AICPA SOC 2 Type 2](https://surrealdb.com/assets/static/aicpa-soc.CE_YjqhK.svg)

![Cyber Essentials](https://surrealdb.com/assets/static/cyber-essentials.CtbmbYfL.svg)

![GDPR](https://surrealdb.com/assets/static/gdpr.IadR7loS.svg)

![Cyber Essentials Plus](https://surrealdb.com/assets/static/cyber-essentials-plus.Cl5P05xe.svg)

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://surrealdb.com"},{"@type":"ListItem","position":2,"name":"Releases","item":"https://surrealdb.com/releases"},{"@type":"ListItem","position":3,"name":"1.1","item":"https://surrealdb.com/releases/1.1"}]}
```

```json
{"@context":"https://schema.org","@type":"TechArticle","headline":"SurrealDB 1.1 release notes","description":"Bug fixes: Fix WebSocket notification sending format. Fix missing custom claims from token parameter. Fix URL encoding in JS functions. Fix panic when invoking…","datePublished":"2024-01-16T00:00:00.000Z","dateModified":"2024-01-16T00:00:00.000Z","url":"https://surrealdb.com/releases/1.1","mainEntityOfPage":{"@type":"WebPage","@id":"https://surrealdb.com/releases/1.1"},"author":{"@type":"Organization","name":"SurrealDB","url":"https://surrealdb.com"},"publisher":{"@type":"Organization","name":"SurrealDB","logo":{"@type":"ImageObject","url":"https://surrealdb.com/assets/static/logo.BG7_TG2b.svg"}},"about":{"@type":"SoftwareApplication","name":"SurrealDB","applicationCategory":"DeveloperApplication","operatingSystem":"Linux, macOS, Windows","softwareVersion":"1.1"}}
```

```json
{"@context":"https://schema.org","@type":"Organization","@id":"https://surrealdb.com/#organization","name":"SurrealDB","url":"https://surrealdb.com","logo":"https://surrealdb.com/assets/static/logo.BG7_TG2b.svg","description":"SurrealDB is the context and memory layer for AI agents. A multi-model database for documents, graphs, vectors, and time-series.","foundingDate":"2022","legalName":"SurrealDB Ltd","identifier":{"@type":"PropertyValue","propertyID":"GB-COH","value":"13615201"},"address":{"@type":"PostalAddress","streetAddress":"3rd Floor, 1 Ashley Road","addressLocality":"Altrincham","addressRegion":"Cheshire","postalCode":"WA14 2DT","addressCountry":"GB"},"contactPoint":[{"@type":"ContactPoint","contactType":"customer support","email":"support@surrealdb.com","url":"https://surrealdb.com/contact","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"sales","email":"info@surrealdb.com","url":"https://surrealdb.com/contact","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"security","email":"security@surrealdb.com","url":"https://surrealdb.com/.well-known/security.txt","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"legal","email":"legal@surrealdb.com","url":"https://surrealdb.com/legal","availableLanguage":"English"}],"hasCertification":[{"@type":"Certification","name":"SOC 2 Type 2"},{"@type":"Certification","name":"GDPR"},{"@type":"Certification","name":"Cyber Essentials Plus"},{"@type":"Certification","name":"ISO 27001"}],"owns":[{"@type":"SoftwareApplication","name":"SurrealDB","url":"https://surrealdb.com/surrealdb"},{"@type":"SoftwareApplication","name":"Agent Memory","url":"https://surrealdb.com/agent-memory"}],"knowsAbout":["multi-model databases","document databases","graph databases","vector search","time-series databases","SurrealQL","Agent Memory","real-time databases","embedded databases","context layer","graph ontology","distributed database","knowledge graphs","distributed transaction protocols","highly-scalable databases"],"sameAs":["https://www.wikidata.org/wiki/Q124316308","https://github.com/surrealdb/surrealdb","https://twitter.com/surrealdb","https://www.youtube.com/@surrealdb","https://www.linkedin.com/company/surrealdb","https://discord.gg/surrealdb","https://www.reddit.com/r/surrealdb","https://www.instagram.com/surrealdb","https://medium.com/surrealdb","https://dev.to/surrealdb"]}
```
