New

Vector RAG that actually understands context

Register now
Features hero illustration

Features

SurrealDB is designed as an AI-native database for builders, offering multi-model support and a wide range of built-in capabilities.

Back to top
Architecture and deploymentPlatformData modelSurrealQLSurrealMLFunctionsPermissionsConnectivityToolingSDKsServer-side SDKsClient-side SDKs

Architecture and deployment

In-memory

Complete

SurrealDB can run in-memory, enabling high performance with the same transactional and multi-model features. This is suitable for caching data or testing locally.

Embedded

Complete

Run SurrealDB embedded within your application, executing directly inside Python and JavaScript runtimes, with WebAssembly, on mobile devices, at the edge, or within the browser.

Single node

Complete

SurrealDB supports single-node deployments with persistent on-disk storage, making it suitable for development, edge, or smaller production workloads.

Distributed

Complete

Run on a distributed storage architecture. Separation of compute and storage enables horizontally scaling compute nodes for read and write concurrency, and storage nodes for multi TBs datasets and high availability.

Platform

Multi-tenancy data separation

Complete

Split data into namespaces and databases. There is no limit to the number of databases under each namespace, with the ability to switch between databases inside queries and transactions.

Schemafull or schemaless

Complete

Store unstructured nested data with any columns, or limit data stored to only specific columns or fields. Get started quickly without having to define every column, and move to schemafull when your data model is defined.

Multi-table, multi-row transactions

Complete

As a fully ACID compliant database, SurrealDB allows you to run transactions across multiple-rows, and across multiple different tables. There is no limit to the length of time a transaction can run.

Versioned temporal tables

In Development

Versioned temporal tables enable the option to 'go back in time' when querying your data. See how data looked before changes were made, or restore to a particular point-in-time.

Table fields

Complete

When a table is defined as schemafull, only data allowed by defined fields will be stored. Table fields can be nested, and can be limited to a certain data type. VALUE clauses can be used to ensure a default value is always specified if no data is entered.

Table events

Complete

Table events can be triggered after any change or modification to the data in a record. Each trigger is able to see the $before and $after value of the record, enabling advanced custom logic with each trigger.

Table indexes

Complete

Table indexes improve data querying performance, and also allow for UNIQUE values in a table. Table indexes can be specified for a column, multiple columns, and have support for all nested fields including arrays and objects.

1-- Specify a field on the user table
2DEFINE FIELD email ON TABLE user TYPE string ASSERT string::is::email($value);
3
4-- Add a unique index on the email field to prevent duplicate values
5DEFINE INDEX email ON TABLE user COLUMNS email UNIQUE;
6
7-- Create a new event whenever a user changes their email address
8DEFINE EVENT email ON TABLE user WHEN $before.email != $after.email THEN (
9 CREATE event SET user = $this, time = time::now(), value = $after.email, action = 'email_changed'
10);

Table constraints

Complete

Each defined table field supports an ASSERT clause which acts as a constraint on the data. This clause enables advanced SurrealQL statements which can ensure that the $value entered is within certain parameters. Each clause is also able to see the $before and $after value of the record, enabling advanced custom logic with each trigger.

1-- Specify a field on the user table
2DEFINE FIELD countrycode ON TABLE user TYPE string
3 -- Enforce country code format to comply with ISO-3166
4 ASSERT $input = /[A-Z]{3}/
5 -- Set a default value
6 DEFAULT 'GBR';

Full text indexing and filtering

Complete

The ability to define full-text indexes, with functionality to search through the full-text index on a table. Searches support field queries, configurable text analyzers, relevance matching, highlighting with offsets extraction.

1-- Define a text analyzer
2DEFINE ANALYZER en TOKENIZERS camel,class FILTERS snowball(English);
3
4-- Define a search index for a field on the book table
5DEFINE INDEX search_title ON book COLUMNS title SEARCH ANALYZER en BM25 HIGHLIGHTS;
6
7-- Select all books who match given keywords
8SELECT search::score(1) AS score, search::highlight('<b>', '</b>', 1) AS title
9 FROM book WHERE title @1@ 'rust web' ORDER BY score DESC;

Vector embedding indexing

Complete

Indexing of vector embeddings, with support for euclidean distance metrics. Vector embeddings can be used for similarity matching, and for advanced data analysis.

1-- Add vector embedding data to record content
2CREATE article:1 SET embedding = [1, 2, 3, 4];
3CREATE article:2 SET embedding = [4, 5, 6, 7];
4CREATE article:3 SET embedding = [8, 9, 10, 11];
5
6-- Define a vector embedding index for a field on the article table
7DEFINE INDEX mt_obj ON vec FIELDS embedding MTREE DIMENSION 4 DIST EUCLIDEAN;

Aggregate analytics views

Complete

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.

1-- Drop all writes to the reading table. We don't need every reading.
2DEFINE TABLE reading DROP;
3
4-- Define a table as a view which aggregates data from the reading table
5DEFINE TABLE temperatures_by_month AS
6 SELECT
7 count() AS total,
8 time::month(recorded_at) AS month,
9 math::mean(temperature) AS average_temp
10 FROM reading
11 GROUP BY city
12;
13
14-- Add a new temperature reading with some basic attributes
15CREATE reading SET
16 temperature = 27.4,
17 recorded_at = time::now(),
18 city = 'London',
19 location = (-0.118092, 51.509865)
20;

Live queries and record changes

Complete

Live SQL queries allow for advanced filtering of the changes to specific documents, documents which match a particular filter, or all documents in a specific table. Live SQL queries can send the fully-updated document, or only the document changesets.

1-- Subscribe to all matching document changes
2LIVE SELECT * FROM document
3 WHERE
4 account = $auth.account
5 OR public = true
6;
7
8-- Subscribe to all changes to a single record
9LIVE SELECT * FROM post:c569rth77ad48tc6s3ig;
10
11-- Stop receiving change notifications
12KILL "1986cc4e-340a-467d-9290-de81583267a2";

Global parameters

Complete

Global parameters can be used to store values across the database, which are then accessible to all queries.

1-- Define a global parameter which will be accessible to all queries.
2DEFINE PARAM $STRIPE VALUE "https://api.stripe.com/payments/new";
3
4-- Use the defined global parameter in all queries on the database.
5DEFINE EVENT payment ON TABLE order WHEN $event = 'CREATE' THEN http::post($STRIPE, $value);

Data model

Basic types

Complete

Support for booleans, strings, and numerics is built in by default. Numeric values default to decimal based numbers, but can be stored as int or float values for 64 bit integer or 64 bit floating point precision.

Empty values

Complete

Values can be NONE, or NULL. A field which is NONE does not have any data stored, while NULL values are values which are entered but empty.

Arrays

Complete

SurrealDB has native support for arrays, with no limit to the depth of nesting within arrays. Arrays can contain any other data value.

Objects

Complete

Embedded object types are an integral feature of SurrealDB, with no limit to the depth of nesting for objects.

Durations

Complete

Any duration from nanoseconds to weeks can be stored and used for calculations. Durations can be added to datetimes, and to other durations.

Datetimes

Complete

Support for dates and datetimes in ISO-8601 format are supported. All dates are converted and stored in the UTC timezone.

Geometries

Complete

SurrealDB makes working with GeoJSON easy, with support for Point, Line, Polygon, MultiPoint, MultiLine, MultiPolygon, and Collection values. SurrealQL automatically detects GeoJSON objects converting them into a single data type.

1UPDATE city:london SET
2 centre = (-0.118092, 51.509865),
3 boundary = {
4 type: "Polygon",
5 coordinates: [[
6 [-0.38314819, 51.37692386], [0.1785278, 51.37692386],
7 [0.1785278, 51.61460570], [-0.38314819, 51.61460570],
8 [-0.38314819, 51.37692386]
9 ]]
10 }
11;

Futures

Complete

Values which should be computed only when outputting data, can be stored as futures. These values are stored in SurrealDB as SurrealQL code, and are calculated only when output as part of a SELECT clause.

1UPDATE product SET
2 name = "SurrealDB",
3 launch_at = <datetime> "2021-11-01",
4 countdown = <future> { launch_at - time::now() }
5;

Casting

Complete

In SurrealDB, all data values are strongly typed. Values can be cast and converted to other types using specific casting operators. These include bool, int, float, string, number, decimal, datetime, and duration casts.

1UPDATE person SET
2 waist = <int> "34",
3 height = <float> 201,
4 score = <decimal> 0.3 + 0.3 + 0.3 + 0.1
5;

Strict typing

Complete

With a strict typing system, SurrealQL ensures that document structures are easier to understand, and any data conforms to the defined record schema. Advanced types for arrays and record links, ensure that related data works in the same way as basic types.

1// Ensure that a record field must be a number.
2DEFINE FIELD age ON person TYPE number;
3
4// Allow the field to be optional or a number.
5DEFINE FIELD age ON person TYPE option<number>;
6
7// Ensure that a record link is specified and of a specific type.
8DEFINE FIELD author ON book TYPE record<person>;
9
10// Allow a field to be optional and of a selection of types.
11DEFINE FIELD pet ON user TYPE option<record<cat | dog>>;
12
13// Allow a field to be one of multiple types.
14DEFINE FIELD rating ON film TYPE float | decimal;
15
16// Ensure that a field is an a array of unique values of a certain length.
17DEFINE FIELD tags ON person TYPE set<string, 5>;

SurrealQL

SELECT, CREATE, UPDATE, DELETE statements

Complete

Manipulation and querying of data in SurrealQL is done using the SELECT, CREATE, UPDATE, and DELETE methods. These enable selecting or modifying individual records, or whole tables. Each statement supports multiple different tables or record types at once.

1-- Create a new article record with a specific id
2CREATE article:surreal SET name = "SurrealDB: The next generation database";
3
4-- Update the article record, and add a new field
5UPDATE article:surreal SET time.created = time::now();
6
7-- Select all matching articles
8SELECT * FROM article, post WHERE name CONTAINS 'SurrealDB';
9
10-- Delete the article
11DELETE article:surreal;

RELATE statements

Complete

The RELATE statement adds graph edges between records in SurrealDB. It follows the convention of vertex -> edge -> vertex or noun -> verb -> noun, enabling the addition of metadata to the edge record.

1-- Add a graph edge between user:tobie and article:surreal
2RELATE user:tobie->write->article:surreal
3 SET time.written = time::now()
4;
5
6-- Add a graph edge between specific users and developers
7LET $from = (SELECT users FROM company:surrealdb);
8LET $devs = (SELECT * FROM user WHERE tags CONTAINS 'developer');
9RELATE $from->like->$devs UNIQUE
10 SET time.connected = time::now()
11;

INSERT statements

Complete

The INSERT statement resembles the traditional SQL statement, enabling users to get started quickly. It supports the creation of records using a VALUES clause, or by specifying the record data as an object.

1INSERT INTO company {
2 name: 'SurrealDB',
3 founded: "2021-09-10",
4 founders: [person:tobie, person:jaime],
5 tags: ['big data', 'database']
6};
7
8INSERT IGNORE INTO company (name, founded)
9 VALUES ('SurrealDB', '2021-09-10')
10 ON DUPLICATE KEY UPDATE tags += 'developer tools'
11;

FOR statements

Complete

FOR statements enable simplified iteration over data, or for advanced logic when dealing with nested arrays or recursive functions, within code blocks or custom functions.

THROW statements

Complete

The THROW statement can be used to return custom error types, which allow for building advanced programming and business logic right within the database and authentication engine.

Parameters

Complete

Parameters can be used to store values or result sets, and can be used as stored parameters in client code.

Subqueries

Complete

Recursive subqueries are useful for advanced querying or modification of values, whilst simplifying the overall query.

Nested field queries

Complete

In SurrealQL any nested array or object value can be accessed and manipulated using traditional dot notation, or array notation.

Maths operators

Complete

Maths operators can be used to perform complex mathematical calculations directly in SurrealQL.

Geo operators

Complete

Geospatial operators enable geospatial containment and intersection operators on geospatial types.

Set operators

Complete

Advanced set operators can be used to detect whether one or multiple values are included within an array. Fuzzy matching and regex matching can also be used for advanced filtering.

Maths constants

Complete

SurrealQL has a number of built-in constants for advanced mathematical expressions and calculations, including math::E, math::PI, math::TAU, and more.

1-- Use mathematical operators to calculate value
2SELECT * FROM temperature WHERE (celsius * 1.8) + 32 > 86.0;
3
4-- Use geospatial operator to detect polygon containment
5SELECT * FROM restaurant WHERE location INSIDE {
6 type: "Polygon",
7 coordinates: [[
8 [-0.38314819, 51.37692386], [0.1785278, 51.37692386],
9 [0.1785278, 51.61460570], [-0.38314819, 51.61460570],
10 [-0.38314819, 51.37692386]
11 ]]
12};
13
14-- Select all people whose tags contain "tag1" OR "tag2"
15SELECT * FROM person WHERE tags CONTAINSANY ["tag1", "tag2"];
16
17-- Select all people who have any email address ending in 'gmail.com'
18SELECT * FROM person WHERE emails.*.value ?= /gmail.com$/;

Expressions

Complete

SurrealQL supports fetching data using dot notation, array notation, and graph semantics. SurrealQL enables records to link to other records and traverses all embedded links or graph connections as desired. When traversing and fetching remote records SurrealQL enables advanced filtering using traditional WHERE clauses.

1-- Select a nested array, and filter based on an attribute
2SELECT emails[WHERE active = true] FROM person;
3
4-- Select all 1st, 2nd, and 3rd level people who this specific person record knows, or likes, as separate outputs
5SELECT ->knows->(? AS f1)->knows->(? AS f2)->(knows, likes WHERE influencer = true AS e3)->(? AS f3) FROM person:tobie;
6
7-- Select all person records (and their recipients), who have sent more than 5 emails
8SELECT *, ->sent->email->to->person FROM person WHERE count(->sent->email) > 5;
9
10-- Select other products purchased by people who purchased this laptop
11SELECT <-purchased<-person->purchased->product FROM product:laptop;
12
13-- Select products purchased by people in the last 3 weeks who have purchased the same products that we purchased
14SELECT ->purchased->product<-purchased<-person->(purchased WHERE created_at > time::now() - 3w)->product FROM person:tobie;

Complex Record IDs

Complete

SurrealDB supports the ability to define complex record IDs using arrays. These values sort correctly, and can be used to store values or recordings in a timeseries context.

1// Set a new parameter
2LET $now = time::now();
3// Create a record with a complex ID using an array
4CREATE temperature:['London', $now] SET
5 location = 'London',
6 date = time::round($now, 1h),
7 temperature = 23.7
8;

Record ID ranges

Complete

SurrealDB supports the ability to query a range of records, using the record ID. The record ID ranges, retrieve records using the natural sorting order of the record IDs. These range queries can be used to query a range of records in a timeseries context.

1-- Select all person records with IDs between the given range
2SELECT * FROM person:1..1000;
3-- Select all records for a particular location, inclusive
4SELECT * FROM temperature:['London', NONE]..=['London', time::now()];
5-- Select all temperature records with IDs less than a maximum value
6SELECT * FROM temperature:..['London', '2022-08-29T08:09:31'];
7-- Select all temperature records with IDs greater than a minimum value
8SELECT * FROM temperature:['London', '2022-08-29T08:03:39']..;
9-- Select all temperature records with IDs between the specified range
10SELECT * FROM temperature:['London', '2022-08-29T08:03:39']..['London', '2022-08-29T08:09:31'];

SurrealML

Custom machine learning models

Complete

Use SurrealML to train custom machine learning models in Python, using PyTorch, Tensorflow, or Sklearn. The models are stored in a custom .surml data-format, enabling the model to be run consistently and safely in Python, Rust, or SurrealDB.

Import models into SurrealDB

Complete

SurrealDB allows developers the choice of storing SurrealML models on local storage, or remote storage including Amazon S3, Google Cloud Storage, or Azure Storage.

PyTorch

Available

PyTorch models are supported natively with SurrealML when running in Python, or within SurrealDB.

Tensorflow

Available

Tensorflow models are supported natively with SurrealML when running in Python, or within SurrealDB.

Sklearn

Available

Sklearn models are supported natively with SurrealML when running in Python, or within SurrealDB.

Export models from SurrealDB

Complete

SurrealDB allows developers to store multiple versions of each SurrealML model, and to export each model from the database as a binary file.

Model inference in Python

Complete

Inference on .surml model files in Python allows for consistent and reproducible model computation in development, continuous integration, testing, or production environments.

Model inference in SurrealDB

Complete

Model inference within SurrealDB is powered by a Rust-native runtime, backed by ONNX, with support for PyTorch, Tensorflow, and Sklearn models. This secure, and performant runtime allows for CPU and GPU model inference right alongside the data within the database.

1-- Perform raw computation against the imported model
2RETURN ml::house::price::prediction<0.3.0>(
3 [1.0, 2.0], [1, 2]
4);
5-- Perform named buffered computation against the imported model
6SELECT
7 *,
8 ml::house::price::prediction<0.3.0>({
9 squarefoot: squarefoot_col,
10 num_floors: num_floors_col
11 }) AS price_prediction
12 FROM property_listing
13 WHERE price_prediction > 177206.21875
14;

Functions

Array functions

Complete

Functions for manipulation, joining, and diffing of arrays are built into SurrealDB as standard.

Http functions

Complete

HTTP functions can be used for remote trigger events and webhook functionality.

Math functions

Complete

Math functions can be used for complex statistical analysis of numbers and sets of numbers.

Parsing functions

Complete

Parsing functions can be used for parsing and extracting individual parts or urls, emails, and domains.

Rand functions

Complete

Random generation functions can be used to generate random values, numbers, strings, UUIDs, and datetimes.

Search functions

Complete

Functions related to the full-text search capabilities, such as calculating relevance scores or highlighting content.

String functions

Complete

Functions for string manipulation enable modification and processing of strings.

Type functions

Complete

Type checking functions can be used to check the type of a value, which is useful in custom function definitions.

Vector functions

Complete

A collection of essential vector operations that provide foundational functionality for numerical computation, machine learning, and data analysis.

Geo functions

Complete

Geospatial functions can be used for converting between geohash values, and for calculating the distance, bearing, and area of GeoJSON data types.

Time functions

Complete

Time functions can be used to manipulate dates and times - with support for rounding, and extracting specific parts of datetimes.

Count functions

Complete

SurrealDB supports general count functionality for counting total values, or for aggregate grouping. It's also possible to count only those expressions which result in a truthy value.

Validation functions

Complete

Validation functions can be used to determine that field values match a certain pattern including hexadecimal, alphanumeric, ascii, numeric, or email addresses.

Embedded JavaScript functions

Complete

JavaScript functions can be used for more complex functions and triggers. Each JavaScript function iteration runs with its own context isolation - with the current record data passed in as the execution context or this value.

1CREATE film SET
2 ratings = [
3 { rating: 6, user: user:bt8e39uh1ouhfm8ko8s0 },
4 { rating: 8, user: user:bsilfhu88j04rgs0ga70 },
5 ],
6 featured = function() {
7 return this.ratings.filter(r => {
8 return r.rating >= 7;
9 }).map(r => {
10 return { ...r, rating: r.rating * 10 };
11 });
12 }
13;

Custom functions

Complete

Custom functions 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.

1-- Define a global function which can be used in any query
2DEFINE FUNCTION fn::get::person($first: string, $last: string, $birthday: string) {
3
4 LET $person = SELECT * FROM person WHERE [first, last, birthday] = [$first, $last, $birthday];
5
6 RETURN IF $person[0].id THEN
7 $person[0]
8 ELSE
9 CREATE person SET first = $first, last = $last, birthday = $birthday
10 END;
11
12};
13
14-- Call the global custom function, receiving the returned result
15LET $person = fn::get::person('Tobie', 'Morgan Hitchcock', '2022-09-21');

Permissions

Root access

Complete

Root access enables full data access for all data in SurrealDB. Root access can be limited to specific IPv4 or IPv6 IP addresses.

Namespace access

Complete

Namespace access enables full data access for all databases under a specific namespace. This access level is controlled using custom defined usernames and passwords.

Database access

Complete

Database access enables full data access to a specific database under a specific namespace. This access level is controlled using custom defined usernames and passwords.

Record access

Complete

Record access is the powerful functionality which enables SurrealDB to operate as a web database. Flexible authentication and access rules enable fine-grained access to tables and fields with the highest security, whilst ensuring that performance is affected as little as possible.

3rd party authentication

Complete

If authentication with a 3rd party OAuth provider is desired, specific tokens can be used for authentication with SurrealDB. ES256, ES384, ES512, HS256, HS384, HS512, PS256, PS384, PS512, RS256, RS384, and RS512 algorithms are supported.

1-- Enable scope authentication directly in SurrealDB
2DEFINE SCOPE account SESSION 24h
3 SIGNUP ( CREATE user SET email = $email, pass = crypto::argon2::generate($pass) )
4 SIGNIN ( SELECT * FROM user WHERE email = $email AND crypto::argon2::compare(pass, $pass) )
5;

Table permissions

Complete

Fine-grained table permissions can be used to prevent users from accessing data which they shouldn't see. Independent permissions for selecting, creating, updating, and deleting data are supported, ensuring fine-grained control over all data in SurrealDB.

1-- Specify access permissions for the 'post' table
2DEFINE TABLE post SCHEMALESS
3 PERMISSIONS
4 FOR select
5 -- Published posts can be selected
6 WHERE published = true
7 -- A user can select all their own posts
8 OR user = $auth.id
9 FOR create, update
10 -- A user can create or update their own posts
11 WHERE user = $auth.id
12 FOR delete
13 -- A user can delete their own posts
14 WHERE user = $auth.id
15 -- Or an admin can delete any posts
16 OR $auth.admin = true
17;

Connectivity

REST API

Complete

All tables and data can be queried using a traditional Key-Value REST API. In addition, SurrealQL statements can be submitted to the REST API for custom query logic.

SurrealQL over HTTP/WS

Complete

SurrealQL querying and data modification is supported over WebSockets for bi-directional communication, and real-time updates.

CBOR RPC over HTTP/WS

Complete

Querying and data modification is available using CBOR-RPC over WebSockets, enabling easier implementation of 3rd party libraries.

JSON RPC over HTTP/WS

Complete

SurrealQL querying and data modification is supported over WebSockets for bi-directional communication, and real-time updates.

Binary RPC over HTTP/WS

Complete

Querying and data modification is available using JSON-RPC over WebSockets, enabling easier implementation of 3rd party libraries.

GraphQL schema generation

Experimental

Support for automatic generation of GraphQL schema, from database tables, fields, types, and custom functions.

GraphQL querying

Experimental

Support for querying all data using GraphQL, with embedded and remote record fetching.

GraphQL mutations

Planned

Support for modifying and updating any data using GraphQL, depending on permissions.

GraphQL subscriptions

Planned

Support for subscribing to real-time data modification events, depending on permissions.

Tooling

Command-line tool

Complete

The command-line tool can be used to export data as SurrealQL, import data as SurrealQL, and start a SurrealDB instance or cluster.

SQL export

Complete

Export all data as SurrealQL from a SurrealDB database for backup purposes. This includes authentication scopes, tables, fields, events, indexes, and data.

SQL import

Complete

Import SurrealQL into a SurrealDB database in order to restore from a backup. This includes authentication scopes, tables, fields, events, indexes, and data.

Incremental backups

Future

Export all data from SurrealDB as raw binary data. This will also support incremental binary backups for efficient backing up of SurrealDB clusters.

Docker container

Complete

In addition to binary releases, SurrealDB is packaged as a Docker container for easy setup and configuration. The Docker container can be used to start a SurrealDB instance or cluster, or to import and export data.

IDE language support

Complete

Official SurrealQL language highlighting packages for Visual Studio Code using TextMate grammar definitions.

Language Server Protocol

Future

Support for the Language Server Protocol will help with code and query completion, and error highlighting for SurrealQL.

User Interface

Complete

An easy-to-use interface with support for table-based views, SurrealQL querying, embedded object editing, and graph visualisation.

Web app

Complete

The interface is available as a web app.

macOS

Complete

The interface is available as a desktop application for macOS powered by Tauri.

Windows

Complete

The interface is available as a desktop application for Windows powered by Tauri.

Linux

Complete

The interface is available as a desktop application for Linux powered by Tauri.

SDKs

Server-side SDKs

Rust

Rust

Available

A native async-friendly SDK for Rust with bi-directional, binary communication over WebSocket or HTTP, and support for SurrealDB embedded in-memory and on-disk.

JavaScript

JavaScript

Available

A native SDK for JavaScript with bi-directional, binary communication over WebSockets or HTTP, and support for SurrealDB embedded in-memory and on-disk.

TypeScript

TypeScript

Available

Full support for TypeScript definitions from within the JavaScript SDK, for working with strongly-typed data with embedded and remote databases.

Node.js

Node.js

Available

A native Node.js plugin for use with the JavaScript SDK, enabling support for SurrealDB embedded in-memory or on-disk using SurrealKV.

Deno

Deno

Coming Soon

A native Deno plugin for use with the JavaScript SDK, enabling support for SurrealDB embedded in-memory or on-disk using SurrealKV.

Python

Python

Available

An SDK for sync or async Python runtimes, with binary communication over WebSocket or HTTP, and support for SurrealDB embedded in-memory and on-disk.

Java

Java

Available

An SDK for Java with binary communication over WebSocket or HTTP, and support for SurrealDB embedded in-memory and on-disk.

Golang

Golang

Available

An SDK for Golang with binary communication over WebSocket or HTTP, and support for SurrealDB embedded in-memory and on-disk.

.NET

.NET

Available

A native SDK for .NET with bi-directional communication over WebSockets or HTTP.

PHP

PHP

Available

A native SDK for PHP with bi-directional, binary communication over WebSockets or HTTP.

C

C

Available

An SDK for C with binary communication over WebSocket or HTTP, and support for SurrealDB embedded in-memory and on-disk.

Dart

Dart

Future

An SDK for Dart with binary communication over WebSocket or HTTP, and support for SurrealDB embedded in-memory and on-disk.

Swift

Swift

Future

A native SDK for Swift with bi-directional, binary communication over WebSockets or HTTP.

Ruby

Ruby

Future

A native SDK for Ruby with bi-directional, binary communication over WebSockets or HTTP.

Erlang

Erlang

Future

A native SDK for Erlang with bi-directional, binary communication over WebSockets or HTTP.

Client-side SDKs

JavaScript

JavaScript

Available

A native SDK for JavaScript with bi-directional, binary communication over WebSockets or HTTP, and support for SurrealDB embedded in-memory and on-disk.

TypeScript

TypeScript

Available

Full support for TypeScript definitions from within the JavaScript SDK, for working with strongly-typed data with embedded and remote databases.

WebAssembly

WebAssembly

Available

A WebAssembly plugin for use with the JavaScript SDK in the browser, enabling support for SurrealDB embedded in-memory or persisted in IndexedDB.

Ember.js

Ember.js

Coming Soon

A real-time, live-updating SDK for Ember.js, with authentication, model definition, embedded types, caching, and remote fetching.

React.js

React.js

Available

Support for React.js using the native JavaScript SDK, within TanStack Query, with support for data caching and syncing, and authentication.

Next.js

Next.js

Available

Support for Next.js using the native JavaScript SDK, within TanStack Query, with support for data caching and syncing, and authentication.

Vue.js

Vue.js

Available

Support for Vue.js using the native JavaScript SDK, within TanStack Query, with support for data caching and syncing, and authentication.

Angular

Angular

Available

Support for Angular using the native JavaScript SDK, within TanStack Query, with support for data caching and syncing, and authentication.

Solid.js

Solid.js

Available

Support for Solid.js using the native JavaScript SDK, within TanStack Query, with support for data caching and syncing, and authentication.

Svelte

Svelte

Available

Support for Svelte using the native JavaScript SDK, within TanStack Query, with support for data caching and syncing, and authentication.

Flutter

Flutter

Future

An SDK for Flutter with bi-directional communication over WebSockets.