SurrealDb.Reactive
1.0.0
dotnet add package SurrealDb.Reactive --version 1.0.0
NuGet\Install-Package SurrealDb.Reactive -Version 1.0.0
<PackageReference Include="SurrealDb.Reactive" Version="1.0.0" />
<PackageVersion Include="SurrealDb.Reactive" Version="1.0.0" />
<PackageReference Include="SurrealDb.Reactive" />
paket add SurrealDb.Reactive --version 1.0.0
#r "nuget: SurrealDb.Reactive, 1.0.0"
#:package SurrealDb.Reactive@1.0.0
#addin nuget:?package=SurrealDb.Reactive&version=1.0.0
#tool nuget:?package=SurrealDb.Reactive&version=1.0.0
SurrealDb.Reactive
Reactive Extensions package for the official SurrealDB SDK for .NET.
Documentation
View the SDK documentation here.
How to install
dotnet add package SurrealDb.Reactive
Getting started
Follow the documentation of the .NET SDK to setup a new SurrealDbClient. When done, you can now use the methods provided by the Reactive Extensions package for .NET.
Examples - Observe Live Query changes
client
.ObserveTable<PostRecord>("post")
// Similar to observing the query "LIVE SELECT * FROM post;"
.Subscribe(response =>
{
// you can listen to any live query response
});
client
.ObserveTable<PostRecord>("post")
.OfType<SurrealDbLiveQueryCreateResponse<PostRecord>>()
.Select(r => r.Result)
.Subscribe(record =>
{
// you can filter out the LQ type and get every created records in realtime
});
Examples - Record table aggregation
If you want to get a list of all records being created/updated/deleted since watching the Live Query, you can aggregate all the records using the AggregateRecords.
using var liveQuery = client.ListenLive<PostRecord>(liveQueryUuid);
liveQuery
.GetResults()
.ToObservable()
.AggregateRecords(new Dictionary<string, TestRecord>())
.Select(x => x.Values.ToList())
.Subscribe(records =>
{
// You can consume the list of all records, being updating in realtime on each CREATE, UPDATE or DELETE event
});
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- ConcurrentHashSet (>= 1.3.0)
- Dahomey.Cbor (>= 1.26.3)
- Microsoft.Extensions.Http (>= 10.0.7)
- Microsoft.IO.RecyclableMemoryStream (>= 3.0.1)
- Microsoft.Spatial (>= 7.22.0)
- Semver (>= 3.0.0)
- SurrealDb.Net (>= 1.0.0)
- System.Collections.Immutable (>= 10.0.7)
- System.Interactive.Async (>= 7.0.1)
- System.Linq.AsyncEnumerable (>= 10.0.7)
- SystemTextJsonPatch (>= 5.0.0)
- Websocket.Client (>= 5.3.0)
-
net10.0
- ConcurrentHashSet (>= 1.3.0)
- Dahomey.Cbor (>= 1.26.3)
- Microsoft.AspNetCore.JsonPatch.SystemTextJson (>= 10.0.7)
- Microsoft.Extensions.Http (>= 10.0.7)
- Microsoft.IO.RecyclableMemoryStream (>= 3.0.1)
- Microsoft.Spatial (>= 7.22.0)
- Semver (>= 3.0.0)
- SurrealDb.Net (>= 1.0.0)
- System.Interactive.Async (>= 7.0.1)
- Websocket.Client (>= 5.3.0)
-
net8.0
- ConcurrentHashSet (>= 1.3.0)
- Dahomey.Cbor (>= 1.26.3)
- Microsoft.Extensions.Http (>= 10.0.7)
- Microsoft.IO.RecyclableMemoryStream (>= 3.0.1)
- Microsoft.Spatial (>= 7.22.0)
- Semver (>= 3.0.0)
- SurrealDb.Net (>= 1.0.0)
- System.Collections.Immutable (>= 10.0.7)
- System.Interactive.Async (>= 7.0.1)
- System.Linq.AsyncEnumerable (>= 10.0.7)
- SystemTextJsonPatch (>= 5.0.0)
- Websocket.Client (>= 5.3.0)
-
net9.0
- ConcurrentHashSet (>= 1.3.0)
- Dahomey.Cbor (>= 1.26.3)
- Microsoft.Extensions.Http (>= 10.0.7)
- Microsoft.IO.RecyclableMemoryStream (>= 3.0.1)
- Microsoft.Spatial (>= 7.22.0)
- Semver (>= 3.0.0)
- SurrealDb.Net (>= 1.0.0)
- System.Collections.Immutable (>= 10.0.7)
- System.Interactive.Async (>= 7.0.1)
- System.Linq.AsyncEnumerable (>= 10.0.7)
- SystemTextJsonPatch (>= 5.0.0)
- Websocket.Client (>= 5.3.0)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on SurrealDb.Reactive:
| Package | Downloads |
|---|---|
|
CloudTheWolf.DSharpPlus.Scaffolding.Data
Database System for CloudTheWolf.DSharpPlus.Scaffolding |
|
|
AeroDB
.NET Transactional Document DB and Event Store on SurrealDB |
|
|
AeroDB.Sable
.NET Transactional Document DB and Event Store on SurrealDB |
|
|
Dali
.NET Transactional Document DB and Event Store on SurrealDB |
GitHub repositories
This package is not used by any popular GitHub repositories.