Spacetime::Client
Real-time SpacetimeDB client managing WebSocket connections, live SQL subscriptions,
transactional reducer/procedure invocations, and an automatic client-side ClientCache.
Constructors
Instance methods
Calls a server-side procedure with BSATN args bytes.
Calls a server-side reducer with pre-encoded BSATN args bytes (or a block that writes arguments to a BSATN::Encoder).
Calls a server-side reducer by encoding arguments via a BSATN::Encoder block.
Processes a decoded Protocol::ServerMessage and updates the client cache & callbacks.
Registers a callback invoked when the server sends the connection's IdentityToken.
Registers a callback invoked when a specific named reducer finishes executing.
Registers a callback invoked when a subscription (InitialSubscription, SubscribeApplied, or SubscribeMultiApplied) is applied.
Sends a OneOffQuery over the WebSocket connection and returns the message_id.
Registers a table type T with the client's local reactive cache and returns its TableCache(T).
Sends a Protocol::ClientMessage over the active transport.
Sends a legacy Subscribe message replacing the active subscription query set.
Sends a SubscribeMulti message for multiple SQL queries under a single QueryId.
Sends a SubscribeSingle message and returns {request_id, query_id}.
Accesses the typed TableCache(T) for table T.
Unsubscribes from a SubscribeSingle subscription by QueryId.