### SurrealDB SurrealDB is a native, open-source, multi-model database that lets you store and manage data across relational, document, graph, time series, vector search, and geospatial models—all in one place. Powered by a flexible, SQL-like query language called SurrealQL, you can write queries using familiar syntax while... - [SurrealDB](https://surrealdb.com/docs/surrealdb): SurrealDB is a native, open-source, multi-model database that lets you store and manage data across relational, document, graph, time series, vector search, and geospatial models—all in one place. Powered by a flexible, SQL-like query language called SurrealQL, you can write queries using familiar syntax while... - [Environment variables used for SurrealDB](https://surrealdb.com/docs/surrealdb/cli/env): Environment variables can be used to tailor the behaviour of a running SurrealDB instance. Environment variables are divided into four types: Many environment variables have a maximum value equivalent to the greatest possible usize, which is an unsigned integer with a number of bytes depending on the target that the... - [CLI tool](https://surrealdb.com/docs/surrealdb/cli): The SurrealDB command-line tool uses a single command for functionality such as starting a single SurrealDB instance, exporting a dataset as a .surql file, importing SurrealQL into a local or remote database, upgrading to a new version of SurrealDB, or opening a REPL to make queries on a running instance. Before using... - [Validate command](https://surrealdb.com/docs/surrealdb/cli/validate): The validate command validates one or many SurrealQL (.surql) language files. Make sure you’ve installed SurrealDB — it should only take a second! - [Upgrade command](https://surrealdb.com/docs/surrealdb/cli/upgrade): The upgrade command upgrades SurrealDB to the latest version, nightly or a specified version. Make sure you’ve installed SurrealDB — it should only take a second! --nightly - [Fix command](https://surrealdb.com/docs/surrealdb/cli/fix): The fix command converts SurrealDB version 1.x data into a format that can be used in SurrealDB 2.x. Make sure you’ve installed SurrealDB — it should only take a second! -e / --log - [Start command](https://surrealdb.com/docs/surrealdb/cli/start): The start command starts a SurrealDB server in memory, on disk, or in a distributed setup. Make sure you’ve installed SurrealDB — it should only take a second! -b / --bind - [Export command](https://surrealdb.com/docs/surrealdb/cli/export): The export command exports a SurrealQL script file from a local or remote SurrealDB database server. Make sure you’ve installed SurrealDB — it should only take a second! -e / --endpoint / --conn - [Isready command](https://surrealdb.com/docs/surrealdb/cli/isready): The isready command attempts to connect to a remote SurrealDB server to detect if it has successfully started and is ready to accept connections. Make sure you’ve installed SurrealDB — it should only take a second! -e / --endpoint / --conn - [SQL command](https://surrealdb.com/docs/surrealdb/cli/sql): The SQL command starts a REPL for running or piping SurrealQL queries to a local or remote SurrealDB database server. Make sure you’ve installed SurrealDB — it should only take a second! -e / --endpoint / --conn - [Import command](https://surrealdb.com/docs/surrealdb/cli/import): The import command imports a SurrealQL script file into a local or remote SurrealDB database server. Make sure you’ve installed SurrealDB — it should only take a second! -e / --endpoint / --conn - [Help command](https://surrealdb.com/docs/surrealdb/cli/help): The help command displays help information and instructions on the command-line tool and its arguments. Make sure you’ve installed SurrealDB — it should only take a second! - [Module command](https://surrealdb.com/docs/surrealdb/cli/module): Available since: v3.0.0 The module command is used to compile, manage and execute Surrealism extension modules on the command line. Make sure you’ve installed SurrealDB — it should only take a second! - [ML](https://surrealdb.com/docs/surrealdb/cli/ml): Make sure you’ve installed SurrealDB — it should only take a second! The ML command can be used to import and export machine learning models. - [Version command](https://surrealdb.com/docs/surrealdb/cli/version): The version command outputs the current version of the installed command-line tool, and the machine architecture. Make sure you’ve installed SurrealDB — it should only take a second! -e / --endpoint - [Introduction](https://surrealdb.com/docs/surrealdb/introduction): SurrealDB is a multi-model database built in Rust designed to unify multiple data models into a single, powerful engine. It combines document, graph, time-series, relational, geospatial and key-value data types into one query language, SurrrealQL, with powerful search and retrieval (vector, full-text, hybrid), and... - [Concepts](https://surrealdb.com/docs/surrealdb/introduction/concepts): This page aims to give details about some of the core concepts of SurrealDB, including the intended usecases, design choices, and overarching features. SurrealDB can be used either as a traditional database platform, with backend languages and frameworks including Golang, Python, Rust, C, Java, .NET, Node.js, and PHP. - [Getting started with SurrealDB](https://surrealdb.com/docs/surrealdb/introduction/start): Welcome to SurrealDB! In this guide, you will learn about the various ways you can start using SurrealDB with interactive examples. - [Architecture](https://surrealdb.com/docs/surrealdb/introduction/architecture): This page aims to give details about some of the core architecture choices of SurrealDB, including the different layers which make up a SurrealDB instance or cluster. SurrealDB is built using a layered approach, with compute separated from storage. - [Embedding SurrealDB in Python](https://surrealdb.com/docs/surrealdb/embedding/python): SurrealDB can be run as an embedded database within your Python application, allowing you to use SurrealDB without running a separate server process. This is ideal for desktop applications, testing, local development, and edge computing scenarios. - [Embedding SurrealDB in .NET](https://surrealdb.com/docs/surrealdb/embedding/dotnet): SurrealDB can be run as an embedded database within your .NET application, allowing you to use SurrealDB without running a separate server process. This is ideal for desktop applications, testing, local development, and edge computing scenarios. - [Embedding SurrealDB](https://surrealdb.com/docs/surrealdb/embedding): In this section, you will find detailed instructions on how to embed SurrealDB into your application depending on your programming language. The purpose of this section is to guide you through the process of embedding SurrealDB, ensuring that you have all the necessary dependencies and configurations in place to start... - [Embedding SurrealDB in JavaScript](https://surrealdb.com/docs/surrealdb/embedding/javascript): SurrealDB is designed to be run in many different ways, and environments. Due to the separation of the storage and compute layers, SurrealDB can be run in embedded mode, from within your JavaScript environments. - [Embedding SurrealDB in Rust](https://surrealdb.com/docs/surrealdb/embedding/rust): SurrealDB can be run as an embedded database within your Rust application, allowing you to use SurrealDB without running a separate server process. This is ideal for desktop applications, testing, local development, and edge computing scenarios. - [Installation](https://surrealdb.com/docs/surrealdb/installation): One of the most popular ways to get started with SurrealDB is to install and run it as a standalone database service, allowing any number of clients to connect to it and interact with the data. Whether you are installing SurrealDB on your local machine for development purposes, or spinning up a production database... - [Install on Linux](https://surrealdb.com/docs/surrealdb/installation/linux): Use this tutorial to install SurrealDB on Linux or Unix operating systems using the SurrealDB install script. Both the SurrealDB database server and the SurrealDB command-line tool are packaged and distributed as a single executable file which is easy to install and uninstall. - [Install on macOS](https://surrealdb.com/docs/surrealdb/installation/macos): Use this tutorial to install SurrealDB on macOS using the SurrealDB install script, or using the third-party Homebrew package manager. Both the SurrealDB database server and the SurrealDB command-line tool are packaged and distributed as a single executable file, which is easy to install, and easy to uninstall. - [Upgrading](https://surrealdb.com/docs/surrealdb/installation/upgrading): When moving to a new version of SurrealDB, it is important to follow the upgrade instructions to ensure that your data is migrated correctly. This page contains information on how to upgrade your SurrealDB installation. - [Upgrading from 2.x to 3.x](https://surrealdb.com/docs/surrealdb/installation/upgrading/migrating-data-to-3x): This guide consolidates all breaking changes when upgrading from SurrealDB 2.x to 3.x, organised by severity level. If you are using Surrealist, you can use the migration diagnostics to automatically see your data. - [Upgrading from 1.x to 2.x](https://surrealdb.com/docs/surrealdb/installation/upgrading/migrating-data-to-2x): The 2.0.0 release of SurrealDB includes many new features, improvements, and bug fixes. However, due to this there are some breaking changes that you should be aware of when upgrading. - [Running SurrealDB](https://surrealdb.com/docs/surrealdb/installation/running): In this section, you will find detailed instructions on how to run SurrealDB on your development environment. The purpose of this section is to guide you through the process of running SurrealDB, ensuring that you have all the necessary dependencies and configurations in place to start using SurrealDB effectively. - [Running SurrealDB with Docker](https://surrealdb.com/docs/surrealdb/installation/running/docker): Use this tutorial to run SurrealDB from within Docker. To get started using Docker, you can use the latest tag. - [Performance characteristics](https://surrealdb.com/docs/surrealdb/installation/running/surrealkv): Although included in SurrealDB since 2.0, the storage engine itself is considered beta, and may require additional development and testing before it is ready for production use. SurrealKV is an embedded ACID-compliant key-value storage engine with built-in versioning, that allows for historical or temporal querying. - [Running a single-node SurrealDB server](https://surrealdb.com/docs/surrealdb/installation/running/rocksdb): For the purposes of getting started with SurrealDB quickly, we will start a RocksDB database which persists data on the filesystem. This configuration is great for trying out the database and small deployments. - [Running an in-memory SurrealDB server](https://surrealdb.com/docs/surrealdb/installation/running/memory): For the purposes of getting started with SurrealDB quickly, we will start an in-memory database which does not persist data on shutdown. This database is great for development and testing. - [Running a multi-node SurrealDB cluster](https://surrealdb.com/docs/surrealdb/installation/running/tikv): For highly-available and highly-scalable setups, SurrealDB can be run on top of a TiKV cluster, with the ability to horizontally scale to very large datasets. In this example, we will start a local TiKV cluster with a single node, for development and testing purposes only. - [Install the Nightly](https://surrealdb.com/docs/surrealdb/installation/nightly): If you prefer developing on the bleeding edge, you can follow this tutorial to install SurrealDB Nightly. The nightly version is built and released every night at midnight, and includes the latest features, and bug fixes. - [Install on Windows](https://surrealdb.com/docs/surrealdb/installation/windows): Use this tutorial to install SurrealDB on Windows operating systems using the SurrealDB install script, or using third-party package managers like Chocolatey or third-party like Scoop. Both the SurrealDB database server and the SurrealDB command-line tool are packaged and distributed as a single executable file which... - [GraphQL](https://surrealdb.com/docs/surrealdb/querying/graphql): In this section, you will explore GraphQL, an industry-wide recognised protocol for interacting with your data, allowing you to query your data using any preferred method which offers precision and efficiency in data retrieval. And in combination with Surrealist, you can now manage your data in a user-friendly... - [GraphQL via HTTP](https://surrealdb.com/docs/surrealdb/querying/graphql/http): SurrealDB provides a powerful HTTP API that allows you to interact with the database programmatically. This API can be used to perform a wide range of database operations, from querying data to modifying records and managing database structures. - [GraphQL via Surrealist](https://surrealdb.com/docs/surrealdb/querying/graphql/surrealist): In this section, you will explore writing GraphQL queries in Surrealist. The GraphQL query view in Surrealist provides a rich set of features, including syntax highlighting, query validation, and query execution. - [GraphQL via Bruno](https://surrealdb.com/docs/surrealdb/querying/graphql/bruno): Before you can start making queries, you need to start SurrealDB. You can do this by starting a new instance of SurrealDB with the surreal start command, docker, Surrealist. - [Querying](https://surrealdb.com/docs/surrealdb/querying): In this section, you will explore some of the ways you can query data in SurrealDB using SurrealQL, GraphQL or via any of the available SDKs. Regardless of the method you choose, SurrealDB provides powerful querying capabilities that allow you to retrieve, filter, and manipulate data efficiently and effectively. - [SurrealQL via SDKs](https://surrealdb.com/docs/surrealdb/querying/sdks): SurrealDB supports a number of methods for connecting to the database and performing data queries. Each SDK has its own set of methods for connecting to the database and performing data queries. - [SurrealQL](https://surrealdb.com/docs/surrealdb/querying/surrealql): In this section, you will explore SurrealQL, a powerful database query language that closely resembles traditional SQL but comes with unique differences and improvements. SurrealQL is designed to provide developers with a seamless and intuitive way to interact with SurrealDB. - [SurrealQL via CLI](https://surrealdb.com/docs/surrealdb/querying/surrealql/cli): In this section, you will explore writing SurrealQL queries using the SurrealDB CLI. To get started, you will need to install the SurrealDB CLI on your local machine. - [SurrealQL via HTTP](https://surrealdb.com/docs/surrealdb/querying/surrealql/http): SurrealDB provides a powerful HTTP API that allows you to interact with the database programmatically. This API can be used to perform a wide range of database operations, from querying data to modifying records and managing database structures. - [SurrealQL via Surrealist](https://surrealdb.com/docs/surrealdb/querying/surrealql/surrealist): In this section, you will explore writing SurrealQL queries using Surrealist, the official query editor for SurrealDB. Surrealist is a powerful tool that allows you to write, execute, and visualize SurrealQL queries in real-time. - [Using SurrealDB as a Full Text Search Database](https://surrealdb.com/docs/surrealdb/models/full-text-search): A full-text search database is designed to index and retrieve text-based data (like articles, messages, or comments) based on tokenized and modified parts of the text itself, rather than exact, literal matches. This allows you to: As a multi-model database, SurrealDB has integrated full-text search capabilities so... - [Using SurrealDB as a Vector Database](https://surrealdb.com/docs/surrealdb/models/vector): A vector database is specialized for storing high-dimensional vectors and for efficiently performing queries on them. Rather than searching on exact values or text-based queries, vector databases let you search based on semantic similarity. - [Using SurrealDB as a Graph Database](https://surrealdb.com/docs/surrealdb/models/graph): A graph database is specifically designed to store data as nodes and edges (relationships between nodes). With this model, connections are front and center, making it easier (and often faster) to query highly connected datasets—like social networks, planning and supply chain relationships, recommendation engines, or... - [Multi-model](https://surrealdb.com/docs/surrealdb/models): When you think of a database, you probably think of a table. A table is a collection of rows and columns, where each row represents a record and each column represents a field. - [Using SurrealDB as a Document Database](https://surrealdb.com/docs/surrealdb/models/document): One of the most popular database models is that of a document database. It provides a flexible way to store data, allowing for nested structures and relationships to be stored within a single document. - [Using SurrealDB as a Geospatial Database](https://surrealdb.com/docs/surrealdb/models/geospatial): A geospatial database is specifically designed (or extended) to store and query data related to the Earth’s surface. Rather than just focusing on numeric or textual data, these systems handle coordinates, polygons, linestrings, and other spatial objects that define locations and shapes. - [Using SurrealDB as a Time Series Database](https://surrealdb.com/docs/surrealdb/models/time-series): A time series database is optimized for storing, querying, and managing time-stamped data. Rather than treating the timestamp as just another attribute, TSDBs place time at the forefront of data modeling, indexing, retention, and query optimization. ### 2.x ### Cloud SurrealDB Cloud transforms the database experience, providing the power and versatility of SurrealDB without the complexity of managing infrastructure. Whether you’re building for passion projects or enterprise-scale applications, SurrealDB Cloud offers the scalability, resilience, and innovation you need to stay... - [Connect to Instance](https://surrealdb.com/docs/cloud/connect): You can connect to your SurrealDB Cloud instances in three main ways. In this section you will explore the following connection options: To connect to an Instance, you must have the following: Explore the connection options for SurrealDB Cloud instances in detail. - [Connect via CLI](https://surrealdb.com/docs/cloud/connect/cli): Once you have created a SurrealDB Cloud Instance, you can connect to it via CLI. The SurrealDB CLI lets you interact with your SurrealDB Cloud Instance from the command line. - [Connect via SDK](https://surrealdb.com/docs/cloud/connect/sdk): Once you have created a SurrealDB Cloud Instance, you can connect to it using any of the available SDKs. This allows you to interact with your SurrealDB Cloud Instance programmatically. - [Connect via HTTP using cURL](https://surrealdb.com/docs/cloud/connect/http): SurrealDB Cloud supports connection via HTTP. This allows you to connect to your SurrealDB Cloud Instance using curl or any HTTP client. - [Querying in Surrealist](https://surrealdb.com/docs/cloud/connect/surrealist): Once you have created a SurrealDB Cloud Instance, you can start querying it in Surrealist in the query view. In the query view, and before you can run queries in Surrealist, you need to select a Namespace and a Database to work in. - [What is SurrealDB Cloud ?](https://surrealdb.com/docs/cloud): SurrealDB Cloud transforms the database experience, providing the power and versatility of SurrealDB without the complexity of managing infrastructure. Whether you’re building for passion projects or enterprise-scale applications, SurrealDB Cloud offers the scalability, resilience, and innovation you need to stay... - [Create an Organisation](https://surrealdb.com/docs/cloud/getting-started/create-an-organisation): SurrealDB Cloud allows you to create a new Organisation with a few clicks to seperately manage your different projects. You can create an Organisation in these steps from the overview: On the overview page, click on the Create organisation button. - [Get Started with SurrealDB Cloud](https://surrealdb.com/docs/cloud/getting-started): SurrealDB Cloud provides services to help you build, manage, and deploy your database. Whether you are a beginner getting started with SurrealDB Cloud or an experienced user looking for specific information, this document provides a comprehensive understanding of SurrealDB Cloud . - [Create an Instance](https://surrealdb.com/docs/cloud/getting-started/create-an-instance): SurrealDB Cloud allows you to create a new Instance with a few clicks. You can create an Instance in your personal account or in an organization. - [Create a SurrealDB Cloud Account](https://surrealdb.com/docs/cloud/getting-started/create-an-account): To get started, in the Surrealist app, click on the Explore SurrealDB Cloud option on the start screen. This will open the Cloud dashboard on the sidebar. - [SurrealDB Cloud Architecture](https://surrealdb.com/docs/cloud/architecture): SurrealDB Cloud benefits from SurrealDB’s layered architecture, which separates storage from compute, enabling improved scalability, durability and availability without the need to operate, manage, scale or shard your database. For development, and staging applications with vertically-scalable requirements. - [FAQs](https://surrealdb.com/docs/cloud/faqs): If you have questions about SurrealDB Cloud , you can find answers on this page. This document provides a comprehensive understanding of SurrealDB Cloud , whether you are a beginner getting started with SurrealDB Cloud or an experienced user looking for specific information. - [Billing and support](https://surrealdb.com/docs/cloud/billing-and-support): In this section you will explore the following billing and support options for SurrealDB Cloud : - [Support](https://surrealdb.com/docs/cloud/billing-and-support/support): SurrealDB Cloud offers a range of support options to help you get started, enhance your skills, and resolve any issues you may encounter. You can use the free community support via our Discord server or signup for a paid support plan. - [Billing](https://surrealdb.com/docs/cloud/billing-and-support/billing): SurrealDB Cloud offers a flexible pricing model that allows you to pay only for the resources you use. Charges are based on the amount of storage, compute power, and network bandwidth you use, enabling you to scale your resources up or down based on your requirements. ### Static ### SDK #### Python The SurrealDB SDK for Python lets you connect to SurrealDB from any Python application. It supports both synchronous and asynchronous workflows, connecting to remote instances over WebSocket or HTTP, and running embedded databases in-process. - [Overview](https://surrealdb.com/docs/sdk/python): The SurrealDB SDK for Python lets you connect to SurrealDB from any Python application. It supports both synchronous and asynchronous workflows, connecting to remote instances over WebSocket or HTTP, and running embedded databases in-process. - [Data manipulation](https://surrealdb.com/docs/sdk/python/concepts/data-manipulation): The Python SDK provides dedicated methods for common CRUD operations on records and tables. These methods offer a structured alternative to writing raw SurrealQL, with built-in parameter handling and type safety. - [Transactions](https://surrealdb.com/docs/sdk/python/concepts/transactions): The Python SDK supports client-side transactions that group multiple operations into a single atomic unit. All operations within a transaction either succeed together when committed or are rolled back entirely when cancelled. - [Embedded databases](https://surrealdb.com/docs/sdk/python/concepts/embedded-databases): The Python SDK can run SurrealDB directly within your application process, eliminating the need for a separate server. Embedded databases are useful for testing, development, desktop applications, and scenarios where a standalone database server is impractical. - [Live queries](https://surrealdb.com/docs/sdk/python/concepts/live-queries): The Python SDK supports real-time live queries that stream changes from the database directly to your application. When records matching a live query are created, updated, or deleted, the SDK delivers notifications through a generator that you can iterate over. - [Error handling](https://surrealdb.com/docs/sdk/python/concepts/error-handling): All errors raised by the Python SDK extend SurrealError, so you can catch every SDK error with a single except clause. Server-originated errors use the ServerError subtree with structured kinds, details, and cause chains. - [Executing queries](https://surrealdb.com/docs/sdk/python/concepts/executing-queries): The Python SDK lets you execute SurrealQL statements directly against the database. You can run ad-hoc queries with parameter binding, retrieve processed results, or access the full raw response for advanced use cases. - [Multiple sessions](https://surrealdb.com/docs/sdk/python/concepts/multiple-sessions): The Python SDK supports creating multiple isolated sessions within a single WebSocket connection. Each session maintains its own namespace, database, and authentication state, allowing you to perform independent operations without opening additional connections. - [Authentication](https://surrealdb.com/docs/sdk/python/concepts/authentication): The Python SDK supports signing in as a root, namespace, database, or record-level user. After signing in, the connection is authenticated for all subsequent operations until the session is invalidated or the connection is closed. - [Value types](https://surrealdb.com/docs/sdk/python/concepts/value-types): The Python SDK maps SurrealDB data types to Python types automatically. Standard Python types like str, int, float, bool, None, dict, and list map directly to their SurrealDB equivalents. - [Connecting to SurrealDB](https://surrealdb.com/docs/sdk/python/concepts/connecting-to-surrealdb): The Python SDK supports connecting to SurrealDB over WebSocket, HTTP, or as an embedded in-process database. Connections can be synchronous or asynchronous, and the SDK automatically selects the correct connection class based on the URL scheme you provide. - [Quickstart](https://surrealdb.com/docs/sdk/python/start): The Python SDK for SurrealDB makes it straightforward to connect to your instance and start querying data. This guide walks you through connecting, authenticating, and performing basic operations. - [SurrealTransaction](https://surrealdb.com/docs/sdk/python/api/core/surreal-transaction): A transaction wraps a connection with both a session ID and a transaction ID, scoping all operations to a single atomic unit. Changes are applied only when the transaction is committed, and can be rolled back with cancel. - [Surreal](https://surrealdb.com/docs/sdk/python/api/core/surreal): The Surreal and AsyncSurreal factory functions create a connection to a SurrealDB instance. They inspect the URL scheme and return the appropriate connection class — WebSocket, HTTP, or embedded — so you use the same interface regardless of protocol. - [SurrealSession](https://surrealdb.com/docs/sdk/python/api/core/surreal-session): A session wraps a WebSocket connection with an isolated session ID. Each session maintains its own namespace, database, variables, and authentication state — independent of other sessions on the same connection. - [Installation](https://surrealdb.com/docs/sdk/python/installation): In this section, you will learn how to install the Python SDK in your project. Install the SurrealDB SDK from PyPI: If you want pydantic validation and serialization support for RecordID, install the optional extra: #### Java The SurrealDB SDK for Java lets you connect to SurrealDB from any Java application. It supports connecting to remote instances over WebSocket or HTTP, and running embedded databases in-process. - [Overview](https://surrealdb.com/docs/sdk/java): The SurrealDB SDK for Java lets you connect to SurrealDB from any Java application. It supports connecting to remote instances over WebSocket or HTTP, and running embedded databases in-process. - [Data manipulation](https://surrealdb.com/docs/sdk/java/concepts/data-manipulation): The Java SDK provides dedicated methods for common CRUD operations on records and tables. These methods offer a structured alternative to writing raw SurrealQL, with built-in type safety through Java generics and POJO deserialization. - [Transactions](https://surrealdb.com/docs/sdk/java/concepts/transactions): The Java SDK supports client-side transactions for grouping multiple queries into an atomic unit. All queries within a Transaction are isolated from other operations and are either applied together on commit or discarded entirely on cancel. - [Embedded databases](https://surrealdb.com/docs/sdk/java/concepts/embedded-databases): The Java SDK can run SurrealDB as an embedded in-process database, eliminating the need for a separate server. Embedded databases use JNI to run the SurrealDB engine directly within your application, which removes network overhead and simplifies deployment for testing, prototyping, and standalone applications. - [Class converters](https://surrealdb.com/docs/sdk/java/concepts/class-converters): The Java SDK includes a built-in class conversion system that automatically maps between Java classes and SurrealDB values. When you pass a Class to SDK methods, the converter serializes Java objects into SurrealDB-compatible data on the way in and deserializes SurrealDB responses back into typed Java objects on... - [Live queries](https://surrealdb.com/docs/sdk/java/concepts/live-queries): The Java SDK supports real-time live queries that stream changes from the database to your application. When records in a table are created, updated, or deleted, the SDK delivers notifications through a LiveStream that you can consume in a loop or process asynchronously. - [Error handling](https://surrealdb.com/docs/sdk/java/concepts/error-handling): The Java SDK provides a structured exception hierarchy for handling errors from the database and SDK. All exceptions extend SurrealException, which is an unchecked exception. - [Executing queries](https://surrealdb.com/docs/sdk/java/concepts/executing-queries): The Java SDK provides methods for executing raw SurrealQL queries against SurrealDB. You can run single or multi-statement queries, bind parameters for safe variable injection, and call server-side functions. - [Multiple sessions](https://surrealdb.com/docs/sdk/java/concepts/multiple-sessions): The Java SDK supports creating multiple isolated sessions over a single connection. Each session maintains its own namespace, database, and authentication state while sharing the underlying transport, which avoids the overhead of establishing multiple connections. - [Authentication](https://surrealdb.com/docs/sdk/java/concepts/authentication): The Java SDK supports signing in as a root, namespace, database, or record-level user. After signing in, the connection is authenticated for all subsequent operations until the session is invalidated or the connection is closed. - [Value types](https://surrealdb.com/docs/sdk/java/concepts/value-types): The Java SDK maps SurrealDB data types to native Java types where possible and provides custom classes for types that have no direct Java equivalent. You can work with results as untyped Value objects or pass a Class to SDK methods for automatic deserialization into POJOs. - [Connecting to SurrealDB](https://surrealdb.com/docs/sdk/java/concepts/connecting-to-surrealdb): The first step towards interacting with SurrealDB is to create a new connection to a database instance. This involves initializing a new Surreal instance, connecting it to an endpoint, and selecting a namespace and database. - [Quickstart](https://surrealdb.com/docs/sdk/java/start): The Java SDK for SurrealDB makes it straightforward to connect to your instance and start querying data. This guide walks you through connecting, authenticating, and performing basic operations. - [Surreal](https://surrealdb.com/docs/sdk/java/api/core/surreal): The Surreal class is the main entry point for the Java SDK. It provides methods for connecting to a SurrealDB instance, authenticating, querying, and managing data. - [LiveStream](https://surrealdb.com/docs/sdk/java/api/core/live-stream): The LiveStream class provides a blocking interface for receiving real-time notifications from live queries. It implements AutoCloseable, so it can be used in a try-with-resources block. - [Response](https://surrealdb.com/docs/sdk/java/api/core/response): The Response class wraps the results returned by a SurrealQL query execution. A single query string can contain multiple statements, and the Response holds the result of each statement indexed by its zero-based position. - [Transaction](https://surrealdb.com/docs/sdk/java/api/core/transaction): The Transaction class wraps a set of operations into an atomic unit. Changes made within a transaction are only applied when committed, and can be rolled back by cancelling. - [Installation](https://surrealdb.com/docs/sdk/java/installation): The SurrealDB SDK for Java is available on the Maven Central repository. You can add it to your project using Gradle or Maven. #### .NET The SurrealDB SDK for C# and .NET enables you to interact with SurrealDB from server-side applications, systems, and APIs, allowing you to integrate SurrealDB into your website or application backend, and serve dynamic content to your users. You can use the .NET SDK to interact with your SurrealDB database instances... - [Data Types](https://surrealdb.com/docs/sdk/dotnet/data-types): The .NET SDK translates datatypes native to SurrealQL into either datatypes native to .NET, or a custom implementation. This document describes all datatypes, and links to their respective documentation. - [Overview](https://surrealdb.com/docs/sdk/dotnet): The SurrealDB SDK for C# and .NET enables you to interact with SurrealDB from server-side applications, systems, and APIs, allowing you to integrate SurrealDB into your website or application backend, and serve dynamic content to your users. You can use the .NET SDK to interact with your SurrealDB database instances... - [Quick start](https://surrealdb.com/docs/sdk/dotnet/start): Now that you have a more comprehensive understanding of the SurrealDB SDK for .NET, let’s create a simple project to get you started. This guide will walk you through creating a simple console application that uses the SurrealDB SDK for .NET to interact with a SurrealDB instance. - [Installation](https://surrealdb.com/docs/sdk/dotnet/installation): Before you can use this SDK in your .NET applications regardless of your environment, you need to install and import it into your project. This guide will walk you through the process of installing and importing the SDK into your project. - [Concepts](https://surrealdb.com/docs/sdk/dotnet/core/writing-surrealql): The methods below are used to interact with the database and perform CRUD operations. You can also use the query method to run SurrealQL statements against the database. - [Concepts](https://surrealdb.com/docs/sdk/dotnet/core): In this section, we will go over the core concepts of the SurrealDB SDK for .NET. You will learn how to connect to a SurrealDB instance, manage authentication, and interact with the database. - [Concepts](https://surrealdb.com/docs/sdk/dotnet/core/dependency-injection): The .NET SDK also support Dependency Injection to ease the use of the SurrealDbClient in your application. Let’s start by creating a new ASP.NET Core web app. - [Concepts](https://surrealdb.com/docs/sdk/dotnet/core/data-manipulation): SurrealDB supports a number of methods for interacting with the database and performing CRUD operations. Selects all records in a table, or a specific record, from the database. - [Concepts](https://surrealdb.com/docs/sdk/dotnet/core/connection-strings): Connection Strings are an easy way to configure your application to connect to a SurrealDB instance. They are stored in the appsettings.json file and can be used to configure the SurrealDbClient. - [Concepts](https://surrealdb.com/docs/sdk/dotnet/core/parameters): Within your application, you can define parameters that can be used to store and retrieve data from SurrealDB. Parameters are used to store data in a structured format, and can be used to store data in a key-value pair format. - [Concepts](https://surrealdb.com/docs/sdk/dotnet/core/streaming): You can use the SurrealDB SDK to create live queries that listen for changes in the database and automatically update your application when changes occur. This feature is useful for building real-time applications that need to respond to changes in the database. - [Concepts](https://surrealdb.com/docs/sdk/dotnet/core/authentication): Since SurrealDB is a database that is designed to be used in a distributed environment, it is important to secure the database and the data that is stored in it. SurrealDB provides a number of methods for authenticating users and securing the database. - [Concepts](https://surrealdb.com/docs/sdk/dotnet/core/create-a-new-connection): After installing the SDK, you can initialize a new instance of a SurrealDB client. When creating a new connection to a SurrealDB instance, you can choose to connect to a local or remote endpoint. #### Golang The SurrealDB SDK for Go enables you to interact with SurrealDB from server-side applications, systems, and APIs. You can use the SDK to execute queries, manage data, authenticate users, subscribe to real-time changes with live queries, and work with interactive sessions and transactions. - [Overview](https://surrealdb.com/docs/sdk/golang): The SurrealDB SDK for Go enables you to interact with SurrealDB from server-side applications, systems, and APIs. You can use the SDK to execute queries, manage data, authenticate users, subscribe to real-time changes with live queries, and work with interactive sessions and transactions. - [Data manipulation](https://surrealdb.com/docs/sdk/golang/concepts/data-manipulation): The Go SDK provides generic top-level functions for common CRUD operations on records and tables. These functions work with *DB, *Session, and *Transaction through the sendable constraint, and return typed results through Go generics. - [Query builder](https://surrealdb.com/docs/sdk/golang/concepts/query-builder): This feature is provided by the contrib/surrealql package, which is outside of the backward compatibility guarantees of the core SDK. Its API may change without following semantic versioning. - [Transactions](https://surrealdb.com/docs/sdk/golang/concepts/transactions): Interactive transactions let you group multiple operations into an atomic unit. Unlike text-based transactions (BEGIN TRANSACTION; ... - [Live queries](https://surrealdb.com/docs/sdk/golang/concepts/live-queries): Live queries allow your application to receive real-time notifications whenever records in a table are created, updated, or deleted. The Go SDK delivers notifications through Go channels, making it easy to integrate with goroutines and concurrent patterns. - [Error handling](https://surrealdb.com/docs/sdk/golang/concepts/error-handling): The Go SDK uses Go’s standard error interface and the errors.As / errors.Is functions for error handling. Errors fall into three main categories: structured server errors from SurrealDB, per-statement query errors, and transport-level failures. - [Executing queries](https://surrealdb.com/docs/sdk/golang/concepts/executing-queries): The Go SDK provides two ways to execute SurrealQL queries: Query for typed, parameterized queries and QueryRaw for composing multiple statements with per-statement results. Both are generic functions that work with *DB, *Session, and *Transaction. - [Multiple sessions](https://surrealdb.com/docs/sdk/golang/concepts/multiple-sessions): Sessions allow you to create isolated contexts on a single WebSocket connection. Each session has its own authentication state, namespace and database selection, and connection variables. - [Authentication](https://surrealdb.com/docs/sdk/golang/concepts/authentication): The Go SDK supports signing in at different access levels, signing up record users, and managing authentication tokens. Authentication is required before most operations and determines what data the connection can access. - [Reliable connections](https://surrealdb.com/docs/sdk/golang/concepts/reliable-connections): This feature is provided by the contrib/rews package, which is outside of the backward compatibility guarantees of the core SDK. Its API may change without following semantic versioning. - [Value types](https://surrealdb.com/docs/sdk/golang/concepts/value-types): The Go SDK communicates with SurrealDB using CBOR (Concise Binary Object Representation) rather than JSON. The SDK provides Go types that map to SurrealDB’s data model and handle CBOR serialization transparently when used in structs or maps. - [Connecting to SurrealDB](https://surrealdb.com/docs/sdk/golang/concepts/connecting-to-surrealdb): The Go SDK supports connecting to SurrealDB over WebSocket or HTTP. The FromEndpointURLString factory function inspects the URL scheme and creates the appropriate connection automatically. - [Quickstart](https://surrealdb.com/docs/sdk/golang/start): The Go SDK for SurrealDB makes it straightforward to connect to your instance and start querying data. This guide walks you through connecting, authenticating, and performing basic operations. - [Session](https://surrealdb.com/docs/sdk/golang/api/core/session): The Session struct represents an additional SurrealDB session on a WebSocket connection. Each session has its own authentication state, namespace and database selection, and connection variables. - [Transaction](https://surrealdb.com/docs/sdk/golang/api/core/transaction): The Transaction struct represents an interactive SurrealDB transaction on a WebSocket connection. Unlike text-based transactions, interactive transactions allow executing statements one at a time and conditionally committing or canceling based on results. - [DB](https://surrealdb.com/docs/sdk/golang/api/core/db): The DB struct is the main client for interacting with SurrealDB. It holds the underlying connection and provides methods for authentication, namespace selection, and live query management. - [Installation](https://surrealdb.com/docs/sdk/golang/installation): Install the SDK from pkg.go.dev using go get: Then import the SDK and its models package in your Go files: The surrealdb package contains the client, query functions, and authentication methods. The models package contains value types such as RecordID, Table, and UUID. #### PHP The SurrealDB SDK for PHP enables you to interact with SurrealDB from server-side applications, systems, and APIs, allowing you to integrate SurrealDB into your website or application backend, and serve dynamic content to your users. You can use the PHP SDK to interact with your SurrealDB database instances, with... - [SurrealDB](https://surrealdb.com/docs/sdk/php/data-types): The PHP SDK translates all SurrealQL datatypes into native PHP types, or a custom implementation. This document describes all datatypes, and links to their respective documentation. string on php.net integer on php.net - [SurrealDB](https://surrealdb.com/docs/sdk/php): The SurrealDB SDK for PHP enables you to interact with SurrealDB from server-side applications, systems, and APIs, allowing you to integrate SurrealDB into your website or application backend, and serve dynamic content to your users. You can use the PHP SDK to interact with your SurrealDB database instances, with... - [SurrealDB Docs](https://surrealdb.com/docs/sdk/php/setup): Before you can use this SDK in PHP, you need to install the SDK via the Composer package manager. This guide will walk you through the process of installing the SDK into your project. - [SurrealDB](https://surrealdb.com/docs/sdk/php/core/data-querying): The methods below are used to interact with the database and perform CRUD operations. You can also use the query method to run SurrealQL statements against the database. - [Integration](https://surrealdb.com/docs/sdk/php/core): In this section, we will go over the core concepts of the SurrealDB SDK for PHP. You will learn how to connect to a SurrealDB instance, manage authentication, and interact with the database. - [SurrealDB](https://surrealdb.com/docs/sdk/php/core/authentication): Since SurrealDB is a database that is designed to be used in a distributed environment, it is important to secure the database and the data that is stored in it. SurrealDB provides a number of methods for authenticating users and securing the database. - [SurrealDB](https://surrealdb.com/docs/sdk/php/core/initialization): This is a guide on how to initialize the SurrealDB SDK for PHP. If you haven’t installed the SDK yet in your PHP project, You can go to getting started to learn how to install the SDK. #### JavaScript The SurrealDB SDK for JavaScript and TypeScript lets you easily connect to SurrealDB from any environment—frontend, backend, serverless, or embedded within your app. It supports connecting to remote or embedded databases, running queries, managing data and authentication, and subscribing to real-time updates with live... - [Overview](https://surrealdb.com/docs/sdk/javascript): The SurrealDB SDK for JavaScript and TypeScript lets you easily connect to SurrealDB from any environment—frontend, backend, serverless, or embedded within your app. It supports connecting to remote or embedded databases, running queries, managing data and authentication, and subscribing to real-time updates with live... - [Frameworks](https://surrealdb.com/docs/sdk/javascript/frameworks/solidjs): SolidJS is a modern JavaScript framework for building responsive and high-performing user interfaces. The SurrealDB SDK for JavaScript can be used in your SolidJS applications to interact with your SurrealDB instance. - [Frameworks](https://surrealdb.com/docs/sdk/javascript/frameworks/react): React is a popular JavaScript library for building user interfaces. The SurrealDB SDK for JavaScript can be used in your React applications to interact with your SurrealDB instance. - [Frameworks](https://surrealdb.com/docs/sdk/javascript/frameworks/vuejs): Vue.js is a progressive JavaScript framework for building user interfaces. The SurrealDB SDK for JavaScript can be used in your Vue applications to interact with your SurrealDB instance. - [Invoking APIs](https://surrealdb.com/docs/sdk/javascript/concepts/invoking-apis): SurrealDB allows you to define custom API endpoints that expose database operations through HTTP-style routes. The JavaScript SDK provides the .api() method to invoke these endpoints with full type safety, custom headers, and structured responses. - [Transactions](https://surrealdb.com/docs/sdk/javascript/concepts/transactions): Transactions allow you to execute a group of queries atomically, meaning either all changes are applied or none are. This is essential for maintaining data consistency when performing related operations that must not be partially applied. - [Node.js engine](https://surrealdb.com/docs/sdk/javascript/concepts/nodejs): The @surrealdb/node package is a plugin for the JavaScript SDK that allows you to run SurrealDB as an embedded database within a Node.js server-side environment. It supports in-memory databases and persistent storage via RocksDB and SurrealKV, and is also compatible with Bun and Deno. - [Live queries](https://surrealdb.com/docs/sdk/javascript/concepts/live-queries): Live queries allow your application to receive real-time notifications whenever records in the database are created, updated, or deleted. The JavaScript SDK provides two approaches: managed live queries that the SDK controls and automatically restarts on reconnect, and unmanaged live queries that you create via... - [Error handling](https://surrealdb.com/docs/sdk/javascript/concepts/error-handling): The JavaScript SDK defines specific error classes for different failure scenarios. All SDK errors extend the base SurrealError class, making it easy to distinguish SDK errors from other JavaScript errors and to handle specific failure types with instanceof checks. - [Executing queries](https://surrealdb.com/docs/sdk/javascript/concepts/executing-queries): The JavaScript SDK provides two ways to execute queries against SurrealDB: raw SurrealQL using the .query() method, and structured query builder methods like .select(), .create(), .update(), and .delete(). Both approaches support type-safe generics, chainable configuration, and multiple result formats. - [Multiple sessions](https://surrealdb.com/docs/sdk/javascript/concepts/multiple-sessions): The JavaScript SDK allows you to create multiple isolated sessions within a single connection. Each session maintains its own namespace, database, variables, and authentication state, while sharing the underlying connection to SurrealDB. - [Utilities](https://surrealdb.com/docs/sdk/javascript/concepts/utilities): The JavaScript SDK provides a set of utility functions for common tasks like deep value comparison, JSON conversion, SurrealQL string serialization, identifier escaping, and expression building. These complement the SDK’s core query methods and value types. - [Authentication](https://surrealdb.com/docs/sdk/javascript/concepts/authentication): SurrealDB supports multiple levels of authentication, from system users to fine-grained record-level access. The JavaScript SDK provides methods for signing up and signing in users, managing tokens, and automatically restoring sessions on reconnect. - [Diagnostics](https://surrealdb.com/docs/sdk/javascript/concepts/diagnostics): The Diagnostics API allows you to wrap engines and intercept protocol-level communication between the SDK and SurrealDB. This is useful for debugging queries, analyzing SDK behavior, measuring operation timings, and building custom logging or monitoring tools. - [Value types](https://surrealdb.com/docs/sdk/javascript/concepts/value-types): The JavaScript SDK provides custom classes for SurrealDB-specific data types that don’t have direct JavaScript equivalents. These classes ensure type safety, preserve database precision, validate input, and integrate seamlessly with the SDK’s query methods. - [Bound queries](https://surrealdb.com/docs/sdk/javascript/concepts/bound-queries): When composing dynamic queries, it is important to avoid string interpolation to prevent injection vulnerabilities. The JavaScript SDK provides bound queries and the surql template tag to safely parameterize values, along with an expressions API for composing dynamic conditions. - [Connecting to SurrealDB](https://surrealdb.com/docs/sdk/javascript/concepts/connecting-to-surrealdb): When creating a new connection to a SurrealDB instance, you can choose to connect to a local or remote endpoint, specify a namespace and database pair to use, authenticate with an existing token, authenticate using a pair of credentials, or use advanced custom logic to prepare the connection to the database. First... - [WebAssembly engine](https://surrealdb.com/docs/sdk/javascript/concepts/web-assembly): The @surrealdb/wasm package is a plugin for the JavaScript SDK that allows you to run SurrealDB as an embedded database within a browser environment. It supports in-memory databases and persistent storage via IndexedDB, and can optionally run inside a Web Worker to keep the main thread responsive. - [Quick start](https://surrealdb.com/docs/sdk/javascript/start): The JavaScript SDK for SurrealDB makes it effortless to connect to your instance and start querying data. This guide will walk you through the process of connecting to a SurrealDB instance and performing basic operations. - [SurrealTransaction](https://surrealdb.com/docs/sdk/javascript/api/core/surreal-transaction): The SurrealTransaction class provides transaction support for executing multiple queries atomically. When all desired queries have been executed, call commit() to apply the changes to the database, or cancel() to discard them. - [SurrealQueryable](https://surrealdb.com/docs/sdk/javascript/api/core/surreal-queryable): The SurrealQueryable class is an abstract base class that provides all query execution methods for interacting with SurrealDB. It is the foundation for executing database operations and is extended by SurrealSession and SurrealTransaction. - [Surreal](https://surrealdb.com/docs/sdk/javascript/api/core/surreal): The Surreal class is the primary interface for connecting to a SurrealDB instance, managing connections, executing queries, and handling database sessions. It extends SurrealSession and inherits all session management and query execution capabilities. - [SurrealSession](https://surrealdb.com/docs/sdk/javascript/api/core/surreal-session): The SurrealSession class represents a scoped contextual session attached to a SurrealDB connection. It provides authentication, session configuration, and inherits all query execution methods from SurrealQueryable. - [SurrealApi](https://surrealdb.com/docs/sdk/javascript/api/core/surreal-api): The SurrealApi class exposes methods to interact with user-defined API endpoints in SurrealDB. It provides type-safe HTTP-style methods (GET, POST, PUT, DELETE, PATCH, TRACE) for invoking custom database APIs. - [Installation](https://surrealdb.com/docs/sdk/javascript/installation): In this section, you will learn how to install the JavaScript SDK in your project. First, install the SurrealDB SDK using your favorite package manager: The SurrealDB SDK for JavaScript is also available in the JSR registry as @surrealdb/surrealdb. #### Rust The SurrealDB SDK for Rust enables you to interact with SurrealDB from client-side, server-side applications, systems, APIs, embedded systems, and IOT devices. The Rust SDK has support for robust error handling and type-safe operations, using an asynchronous API for efficient concurrent database interactions. - [Integration](https://surrealdb.com/docs/sdk/rust): The SurrealDB SDK for Rust enables you to interact with SurrealDB from client-side, server-side applications, systems, APIs, embedded systems, and IOT devices. The Rust SDK has support for robust error handling and type-safe operations, using an asynchronous API for efficient concurrent database interactions. - [Integration](https://surrealdb.com/docs/sdk/rust/frameworks/rocket): The following tutorial will set up a server with SurrealDB and Rocket that has a few endpoints: First, open up a terminal window and use the following command to start an empty database. This will also define a namespace and database by the name of “main” by default. - [Integration](https://surrealdb.com/docs/sdk/rust/frameworks): The following pages each contain a tutorial that walks through the setting up of a web server (for Actix, Axum, and Rocket) or a UI (for Egui) that uses SurrealDB as its storage backend. - [Integration](https://surrealdb.com/docs/sdk/rust/frameworks/egui): The following tutorial will set up a small app with Egui that uses SurrealDB as its database. First, open up a terminal window and use the following command to start an empty database. - [Integration](https://surrealdb.com/docs/sdk/rust/frameworks/actix): The following tutorial will set up a server with SurrealDB and Actix Web that has a few endpoints: First, open up a terminal window and use the following command to start an empty database. This will also define a namespace and database by the name of “main” by default. - [Integration](https://surrealdb.com/docs/sdk/rust/frameworks/axum): The following tutorial will set up a server with SurrealDB and Axum that has a few endpoints: First, open up a terminal window and use the following command to start an empty database. This will also define a namespace and database by the name of “main” by default. - [Multi-tenancy in the Rust SDK](https://surrealdb.com/docs/sdk/rust/concepts/multi-tenancy): Available since: v3.0.0 Multi-tenancy was introduced in SurrealDB 3.0, allowing each tenant to operate inside its own isolated namespace and database. Multi-session inside the Rust SDK is implemented through a session cloning mechanism. - [SurrealDB](https://surrealdb.com/docs/sdk/rust/concepts/authenticating-users): The .signup() and .signin() methods are used for both system users (users created with a DEFINE USER statement) and record users (users created with a DEFINE ACCESS statement). These two methods take any type that implements the Credentials trait, namely the structs Root, Namespace, Database, and Record. - [Concepts](https://surrealdb.com/docs/sdk/rust/concepts): In this section, we will go over the core concepts of the SurrealDB SDK for Rust. You will learn how to connect to a SurrealDB instance, manage authentication, and interact with the database. - [SurrealDB](https://surrealdb.com/docs/sdk/rust/concepts/vector-embeddings): The quickest way to retrieve vector embeddings is to use the fastembed crate, which does not require a user key or calling into an external service. The following blog posts include runnable examples using vector embeddings via the Rust SDK. - [SurrealDB](https://surrealdb.com/docs/sdk/rust/concepts/live): A LIVE SELECT statement creates a session that keeps track of changes to a table in real time. Inside the Rust SDK, this is accomplished by appending .live() to the end of a .select() query. - [Using the Rust crate after SurrealDB 3.0](https://surrealdb.com/docs/sdk/rust/concepts/rust-after-30): The largest user experience improvement for Rust users of SurrealDB 3.0 is the surrealdb-types crate, which was created to have a shared public value type system for SurrealDB. This crate was separated from the SurrealDB core to decouple types and type conversions from core database logic, and to allow other crates to... - [SurrealDB](https://surrealdb.com/docs/sdk/rust/concepts/concurrency): While the Rust SDK for SurrealDB uses the tokio async runtime, the operation of the database itself will only take place concurrently if the code itself uses concurrency. The following example shows how to do this and a comparison of the performance between synchronous and asynchronous usage. - [SurrealDB](https://surrealdb.com/docs/sdk/rust/concepts/fetch): Start a running database using the following command: To follow along interactively, connect using Surrealist or the following command to open up the CLI: Then use the cargo add command to add the crates surrealdb and tokio. - [SurrealDB](https://surrealdb.com/docs/sdk/rust/concepts/transaction): While every query in SurrealDB is run inside its own transaction, manual transactions made up of multiple statements can be used via the BEGIN and COMMIT keywords. The .query() method can take any number of statements, returning a Response that contains the results of each of them. - [SurrealDB](https://surrealdb.com/docs/sdk/rust/concepts/flexible-typing): Most examples in the Rust SDK feature strict types like the following that can be serialized and deserialized as needed. However, sometimes you will need to work with types that have a more dynamic structure. - [SurrealDB](https://surrealdb.com/docs/sdk/rust/setup): First, create a new project using cargo new and add the following dependencies: The two main ways to connect to SurrealDB when getting started are by connecting to a running instance wia the protocol-ws feature, or by running an embedded instance in memory using the kv-mem feature. Each of these can be added via a... ### SurrealML SurrealML is an engine that seeks to do one thing, and one thing well: store and execute trained ML models. SurrealML does not intrude on the training frameworks that are already out there, instead works with them to ease the storage, loading, and execution of models. - [SurrealML](https://surrealdb.com/docs/surrealml): SurrealML is an engine that seeks to do one thing, and one thing well: store and execute trained ML models. SurrealML does not intrude on the training frameworks that are already out there, instead works with them to ease the storage, loading, and execution of models. ### 3.x ### Tutorials Welcome to the tutorial section. Here you will find comprehensive, step-by-step guides that will walk you through various features and functionalities of SurrealDB. - [Tutorials](https://surrealdb.com/docs/tutorials): Welcome to the tutorial section. Here you will find comprehensive, step-by-step guides that will walk you through various features and functionalities of SurrealDB. ### Integrations SurrealDB is designed to be easily integrated with a wide range of different technologies and platforms. Our ecosystem of integrations spans across multiple categories, making it simple to incorporate SurrealDB into your existing tech stack. - [Integrations](https://surrealdb.com/docs/integrations): SurrealDB is designed to be easily integrated with a wide range of different technologies and platforms. Our ecosystem of integrations spans across multiple categories, making it simple to incorporate SurrealDB into your existing tech stack. - [Frameworks](https://surrealdb.com/docs/integrations/frameworks): SurrealDB seamlessly integrates with popular AI and data frameworks, enabling you to leverage SurrealDB’s powerful features like vector search, graph relationships, and structured data storage. These integrations make it easy to build sophisticated applications combining LLMs, agents, data pipelines and more - all... - [Data Management](https://surrealdb.com/docs/integrations/data-management): SurrealDB offers comprehensive data management capabilities to help you efficiently store, organize, and transform your data. Through integrations with leading data platforms, you can build robust ETL pipelines, ingest data from diverse sources, and maintain data quality at scale. - [Embeddings](https://surrealdb.com/docs/integrations/embeddings): SurrealDB offers comprehensive support for vector embeddings, enabling powerful semantic search and machine learning capabilities across your data. Through integrations with leading embedding providers, you can easily store, index and query high-dimensional vectors alongside your regular data. ### Labs Dive into the full range of tools, libraries, and integrations built around SurrealDB. - [SurrealDB Labs](https://surrealdb.com/docs/labs): Dive into the full range of tools, libraries, and integrations built around SurrealDB. ### 1.x ### SurrealQL SurrealQL is a powerful and intuitive database query language that closely resembles traditional SQL but comes with unique differences and improvements. SurrealQL is designed to provide developers with a seamless and intuitive way to interact with SurrealDB. - [SurrealQL](https://surrealdb.com/docs/surrealql): SurrealQL is a powerful and intuitive database query language that closely resembles traditional SQL but comes with unique differences and improvements. SurrealQL is designed to provide developers with a seamless and intuitive way to interact with SurrealDB. - [Clauses](https://surrealdb.com/docs/surrealql/clauses): In SurrealQL, clauses can be used to alter the way a query is executed. They are used in the following ways: - [Statements](https://surrealdb.com/docs/surrealql/statements): SurrealDB has a variety of statements that let you configure and query a database. In this section, we’ll look at the different types of statements that are available. - [SurrealQL functions](https://surrealdb.com/docs/surrealql/functions): SurrealDB offers a number of functions that can be used to perform complex logic. These functions are grouped into the following categories: - [Data types](https://surrealdb.com/docs/surrealql/datamodel): SurrealQL allows you to describe data with specific data types. These data types are used to validate data and to generate the appropriate database schema. ### Surrealist Surrealist is a user interface for interacting with your SurrealDB database visually. It enables you to seamlessly connect to any SurrealDB instance, allowing you to execute queries, explore your tables, design your schemas, and much more. - [Surrealist](https://surrealdb.com/docs/surrealist/advanced-topics/connection-templates): When you find yourself frequently connecting to databases that share similar connection details, it might make sense to create a template. Templates allow you to save partial connection details and reuse them when creating new connections. - [Surrealist](https://surrealdb.com/docs/surrealist/advanced-topics): In this section, we will go over additional features that surrealist offers to enhance your workflow. - [Surrealist](https://surrealdb.com/docs/surrealist/advanced-topics/surrealql-editors): Throughout Surrealist you will encounter various SurrealQL editors. These editors support intelligent SurrealQL highlighting and provide a range of features to help you write queries and edit records. - [Surrealist](https://surrealdb.com/docs/surrealist/advanced-topics/embedding-surrealist): Surrealist can be added to any website or application using Embeds. This lets you run your queries and results on any website or application. - [Surrealist](https://surrealdb.com/docs/surrealist/advanced-topics/settings-and-customisation): In the bottom left of the interface you can find a settings button (⚙) to open the settings dialog. These settings allow you to further customise the behaviour and appearance of Surrealist, such as switching between light and dark mode, increasing or decreasing the editor font sizes, and configure default values for... - [Surrealist](https://surrealdb.com/docs/surrealist/advanced-topics/search-and-shortcuts): Surrealist offers a range of shortcuts to help you navigate the interface more efficiently. You can find a list of all available shortcuts by pressing Ctrl + K or Cmd + K on your keyboard. - [Surrealist](https://surrealdb.com/docs/surrealist/advanced-topics/intents): Surrealist provides a low level system for triggering actions within the interface through a URL. For example, you can use it to open specific dialogs, switch views, or even run queries. - [Surrealist](https://surrealdb.com/docs/surrealist): Surrealist is a user interface for interacting with your SurrealDB database visually. It enables you to seamlessly connect to any SurrealDB instance, allowing you to execute queries, explore your tables, design your schemas, and much more. - [Surrealist](https://surrealdb.com/docs/surrealist/concepts): In this section, we will go over the different views and features available in Surrealist. You will learn how to connect to your database, how to execute queries, how to explore your data, and how to design your schema. - [Surrealist](https://surrealdb.com/docs/surrealist/concepts/writing-stored-procedures): SurrealDB provides the ability to write and store functions, also known as stored procedures, directly in the database. These functions can be called from SurrealQL queries, allowing for more complex and reusable queries. - [Surrealist](https://surrealdb.com/docs/surrealist/concepts/manage-database-access): The Authentication view allows you to control account access to the database. This includes system users (root, namespace, and database) as well as scope access. - [Surrealist](https://surrealdb.com/docs/surrealist/concepts/local-database-serving): Surrealist allows you to easily and effortlessly launch a localhost instance of SurrealDB directly from the interface. For this you will first need to install SurrealDB for your platform. - [Surrealist](https://surrealdb.com/docs/surrealist/concepts/specialized-api-docs): SurrealDB supports a wide array of programming languages to integrate with. The Surrealist API Docs view provides you with a detailed and specialized documentation to integrate with your database using your preferred programming language. - [Surrealist](https://surrealdb.com/docs/surrealist/concepts/sending-queries-with-graphql): The GraphQL view in Surrealist allows you to write, execute, and visualize GraphQL queries in real-time. You can see the results of your queries in JSON structure returned by GraphQL. - [Surrealist](https://surrealdb.com/docs/surrealist/concepts/designing-the-database-schema): The Designer view allows you to graphically visualise, design, and modify your database schema in real time. This view can speed up the creation of tables, indexes, fields, and more. - [Surrealist](https://surrealdb.com/docs/surrealist/concepts/explore-database-records): The second view you can find in Surrealist is the Explorer view, which lists out tables and allows you to browse through all records. This view is especially useful when you want to effortlessly explore your data, compare records, or edit their contents. - [Surrealist](https://surrealdb.com/docs/surrealist/concepts/sending-queries): The first view you encounter when starting Surrealist is the Query view. At its core the Query view allows you to execute SurrealQL queries and view their responses, however additional features include configuring variables to use within your queries, saving queries for later use, and viewing incoming live select... - [Surrealist](https://surrealdb.com/docs/surrealist/concepts/surreal-cloud): SurrealDB Cloud transforms the database experience, providing the power and versatility of SurrealDB without the complexity of managing infrastructure. Whether you’re building for passion projects or enterprise-scale applications, SurrealDB Cloud offers the scalability, resilience, and innovation you need to stay... - [Surrealist](https://surrealdb.com/docs/surrealist/getting-started): This page will guide you through the process of setting up and using Surrealist. At this point we assume you have already installed Surrealist on your system. - [Surrealist](https://surrealdb.com/docs/surrealist/troubleshooting): If you experience issues or unintended behaviour when using Surrealist, please open an issue on our GitHub repository. If you are still running into issues you can attempt one of the following: The developer console may include hints to the cause of your problem. - [Surrealist](https://surrealdb.com/docs/surrealist/installation): There are two primary ways to use Surrealist: as a desktop app or as a web app. While the desktop app offers more features and flexibility, the web app is more accessible and portable. - [Surrealist](https://surrealdb.com/docs/surrealist/faqs): We want to make Surrealist the best database client for SurrealDB. If you have any questions, please reach out to us on Discord or GitHub. - [Surrealist](https://surrealdb.com/docs/surrealist/faqs/info): View some of the frequently asked questions regarding Surrealist. Questions which are frequently asked across our GitHub, Discord and other social platforms will be added here from time to time. - [Surrealist](https://surrealdb.com/docs/surrealist/faqs/known-issues): Here are some known bugs and issues with Surrealist: