Skip to main content

Crate surrealdb_sdk

Crate surrealdb_sdk 

Source
Expand description

Lightweight, standalone remote client SDK for SurrealDB.

This SDK connects to remote SurrealDB instances using high-performance protocols:

  • WebSocket (ws:// / wss://): Default interactive and live-query protocol.
  • HTTP (http:// / https://): REST-compatible HTTP protocol.
  • Raw TCP (tcp://): High-performance, zero-HTTP-overhead binary stream protocol for backend microservices.

Unlike the full surrealdb crate, surrealdb-sdk excludes all embedded KV storage engines (RocksDB, TiKV, IndexDB), reducing compilation footprint and build times for client applications.

Re-exports§

pub use query_result::QueryResult;
pub use query_result::QueryType;
pub use query_result::Status;
pub use token::Token;

Modules§

engine
Remote database engines (WebSocket and HTTP)
export_config
method
Methods to use when interacting with a SurrealDB instance.
opt
The different options and types for use in API functions
query_result
token
types
SurrealDB Types

Structs§

Connect
The future returned when creating a new SurrealDB instance
Error
Represents an error in SurrealDB
IndexedResults
Map of per-statement results from Surreal::query; read rows with IndexedResults::take.
Notification
Stats
Time elapsed for a single statement, paired by WithStats::take after Query::with_stats.
Stream
Notifications from Select::live (built via Surreal::select) or from live handles inside Surreal::query.
Surreal
A database client instance for embedded or remote databases.

Traits§

Connection
Connection trait implemented by supported engines

Type Aliases§

Result
A specialized Result type