> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tablepro.app/llms.txt
> Use this file to discover all available pages before exploring further.

# SurrealDB

> Connect to SurrealDB with namespace and database browsing, SurrealQL, and inline record editing

# SurrealDB Connections

TablePro connects to SurrealDB 2.x and 3.x over the HTTP RPC protocol. Browse namespaces and databases in the sidebar, run SurrealQL in the editor, and edit records inline in the data grid.

The driver talks CBOR, so record links, datetimes, durations, decimals, and UUIDs keep their types instead of arriving as plain strings.

## Quick Setup

Click **New Connection**, select **SurrealDB**, enter the host and port (default `8000`), pick an auth level, and connect. The plugin installs on first use, or install it from **Settings** > **Plugins** > **Browse** > **SurrealDB Driver**.

## Namespaces and databases

SurrealDB nests tables under a namespace and a database. TablePro maps that straight onto the sidebar: namespaces sit at the top level, databases sit inside them, and tables sit inside a database. Switch either level without reconnecting.

Set the namespace in the **Namespace** field when you create the connection. Leave **Database** empty to pick one from the sidebar after connecting.

## Authentication

SurrealDB cannot infer which level your credentials belong to, so pick the one that matches the user you are signing in as.

| Auth Level        | Use it for                                                  | Needs                                                     |
| ----------------- | ----------------------------------------------------------- | --------------------------------------------------------- |
| **Root**          | A root user, defined with `DEFINE USER ... ON ROOT`         | Username, password                                        |
| **Namespace**     | A namespace user                                            | Username, password, namespace                             |
| **Database**      | A database user                                             | Username, password, namespace, database                   |
| **Record Access** | A record user, defined with `DEFINE ACCESS ... TYPE RECORD` | Namespace, database, access method, and the signin fields |
| **Token**         | A JWT you already hold, including SurrealDB Cloud           | The token                                                 |

Only a root user can list every namespace. With namespace or database credentials, TablePro browses the scope your user is limited to.

## Connection Settings

### Required Fields

| Field          | Description                                        |
| -------------- | -------------------------------------------------- |
| **Host**       | Server host, e.g. `localhost`                      |
| **Port**       | HTTP port, default `8000`                          |
| **Auth Level** | Root, Namespace, Database, Record Access, or Token |

### Optional Fields

| Field                     | Description                                                                                        |
| ------------------------- | -------------------------------------------------------------------------------------------------- |
| **Namespace**             | The namespace to open. Required for every level except Root and Token                              |
| **Database**              | The database to open. Required for Database and Record Access; otherwise pick one from the sidebar |
| **SSL**                   | Enable to connect over HTTPS                                                                       |
| **Skip TLS Verification** | Trust a self-signed certificate (Advanced section)                                                 |
| **Token**                 | A JWT, shown when Auth Level is Token                                                              |
| **Access Method**         | The name from `DEFINE ACCESS`, shown when Auth Level is Record Access                              |

## Editing records

The grid writes one field at a time. Changing a cell runs an `UPDATE` that sets only the fields you touched, so computed `FUTURE` fields and fields another writer changed are left alone.

* `id` is the primary key and is read-only. Clear it on a new row to let SurrealDB generate one.
* A record link shows as `table:id`. Objects and arrays show as compact JSON and are edited as JSON.
* On a `RELATION` table, `in` and `out` sit next to `id`.

Values are sent as typed parameters, so an `int` column stays an `int` and a filter value is never treated as SurrealQL.

## Schemaless tables

A `SCHEMALESS` table has no declared fields. TablePro reads the columns from the rows it fetched, so a field only some records carry still gets a column, and records missing it show an empty cell.

## Limitations

* Transactions are not available. Each request is independent over HTTP, so `BEGIN` in one request cannot affect another. Run `BEGIN TRANSACTION; ... COMMIT TRANSACTION;` as a single query in the editor instead.
* The structure editor is read-only. Create and change fields and indexes with `DEFINE FIELD` and `DEFINE INDEX` in the editor.
* Live queries (`LIVE SELECT`) are not supported.
* Range values display but cannot be edited.
* The editor treats SurrealQL as plain text, without syntax coloring.
* SurrealDB 1.x is not supported.
