mongo_realtime library
Classes
- DbWatcher
- DbWatcherListener
- MongoRealtime
- A client for MongoDB realtime updates over WebSocket.
- RealtimeCacheManager
-
RealtimeCollectionReference<
T> - A handle for a named collection on a MongoRealtime server.
- RealtimeDbChange
- Represents a database change event received from the realtime server.
-
RealtimeDocument<
T> - A typed wrapper around a realtime document returned by MongoRealtime.
-
RealtimeDocumentReference<
T> - A reference to a single document within a collection.
- RealtimeLiveQuery
- A live query subscription that maintains a stream of matching documents.
- RealtimeNormalizedUrl
- Result of normalizing a WebSocket URL string.
-
RealtimeQueryBuilder<
T> - Builder for realtime collection queries.
- RealtimeQueryDefinition
- Represents a compiled query definition for realtime fetch and subscription.
- RealtimeQueryManager
- RealtimeQueryOrGroupBuilder
-
Helper builder for composing
$orquery groups. - RealtimeReconnectConfig
- Reconnection behavior for the MongoRealtime client.
- RealtimeWebSocketService
Enums
- RealtimeDbChangeType
- Types of database changes that can be reported to watchers.
Properties
- realtime → MongoRealtime
-
Helper function to access the singleton instance of MongoRealtime.
no setter
Functions
-
normalizeWebSocketUrl(
String input) → RealtimeNormalizedUrl - Normalizes a WebSocket URL string and returns a normalized result.
-
readPath(
JsonMap json, String path) → Object? -
Reads the value at
pathfrom a JSON document using dot notation. -
writePath(
JsonMap json, String path, Object? value) → void -
Sets the value at
pathin a JSON document using dot notation.
Typedefs
- ChangeHandler = void Function(RealtimeDbChange change)
- Handles database change notifications for realtime watchers.
- ConnectedHandler = void Function(MongoRealtime)
- Called when the websocket connection is established.
- DisconnectedHandler = void Function(Object? error)
- Called when the websocket connection is lost.
-
FromJson<
T> = T Function(JsonMap json) - Converts raw document JSON into a typed object.
-
JsonMap
= Map<
String, dynamic> - A JSON-style object used throughout MongoRealtime.
- WarningHandler = void Function(String message)
- Handles warning messages emitted by the MongoRealtime client.