Skip to content
NEW BENCHMARKS

SurrealDB 3.x by the numbers

View

1/3

v1.4.0 is live! 🎉

Release

Apr 9, 20242 min read

Tobie Morgan Hitchcock

Tobie Morgan Hitchcock

Show all posts

v1.4.0 is live! 🎉

Our newsletter

Get tutorials, AI agent recipes, webinars, and early product updates in your inbox every two weeks

We are excited to announce the release of SurrealDB 1.4.0. This release brings a number of improvements and bug fixes which can be seen in detail on our , and in the .

Introduction of specialised table types

In previous versions of SurrealDB, developers could specify constraints on the in and out fields of a table, in order to ensure that a graph relationship was only able to be created between specific tables. This could lead to problems, as it was possible to insert normal record data into graph edge tables, leading to a breakdown in referential integrity.

DEFINE TABLE assigned_to SCHEMAFULL
    PERMISSIONS
        FOR create, select, update, delete
            WHERE in.owner == $auth.id AND out.author == $auth.id;

DEFINE FIELD in ON assigned_to TYPE record<tag>;
DEFINE FIELD out ON assigned_to TYPE record<sticky>;

With the addition of a new TYPE clause in SurrealDB 1.4.0, users can now specify that a table can store either normal records (with TYPE NORMAL), or edge relations (with TYPE RELATION), ensuring more strict control over the schema of a database. IN and OUT keywords can be used to ensure that the table can be constrained for only certain types of relationships.

A table can be either TYPE RELATION (allowing only for the storage of graph edges, or relations), TYPE NORMAL (allowing for the storage of normal records, or graph nodes), and TYPE ANY which allows for the original behaviour of storing any document or record type in the same table. If no table type is set, then due to SurrealDB's schemaless functionality, TYPE ANY will be used as the default option, allowing for any record type to be stored in the table.

As a consequence, the previous example can now be shortened to the following, whilst improving the database behaviour:

DEFINE TABLE assigned_to SCHEMAFULL TYPE RELATION IN tag OUT sticky
    PERMISSIONS
        FOR create, select, update, delete
            WHERE in.owner == $auth.id AND out.author == $auth.id;

Bulk insert support in the Rust SDK

This was one of the frequently requested features. While this was already possible using the query method, in SurrealDB 1.4.0, we have added an insert method that makes it more convenient.

db.insert(Resource::from("person"))
    .content(vec![
        User {
            id: thing("person:tobie")?,
            name: "Tobie",
            settings: Settings {
                active: true,
                marketing: false,
            },
        },
        User {
            id: thing("person:jaime")?,
            name: "Jaime",
            settings: Settings {
                active: true,
                marketing: true,
            },
        },
    ])
    .await?;

But wait, there's more!

There are of course other great things, and bugfixes, we've included in this release, which we have not covered here. To see more examples and improvements , and .

Our newsletter

Get tutorials, AI agent recipes, webinars, and early product updates in your inbox every two weeks

SurrealDB

The context layer for AI agents.

Documents, graphs, vectors, time-series, and memory.
One transaction, one query, one deployment.

Explore with AI

Independently verified

SOC 2 Type 2

GDPR

Cyber Essentials Plus

ISO 27001

Trust Centre

Copyright © 2026 SurrealDB Ltd. Registered in England and Wales. Company no. 13615201

Registered address: 3rd Floor 1 Ashley Road, Altrincham, Cheshire, WA14 2DT, United Kingdom

Trading address: Huckletree Oxford Circus, 213 Oxford Street, London, W1D 2LG, United Kingdom