Replace BLite with Surreal embedded persistence
All checks were successful
NuGet Package Publish / nuget (push) Successful in 1m21s

This commit is contained in:
Joseph Doherty
2026-02-22 05:21:53 -05:00
parent 7ebc2cb567
commit 9c2a77dc3c
56 changed files with 6613 additions and 3177 deletions

View File

@@ -0,0 +1,32 @@
using SurrealDb.Net;
using SurrealDb.Net.Models.Response;
namespace ZB.MOM.WW.CBDDC.Persistence.Surreal;
/// <summary>
/// Abstraction over the embedded Surreal client used by CBDDC persistence stores.
/// </summary>
public interface ICBDDCSurrealEmbeddedClient : IAsyncDisposable, IDisposable
{
/// <summary>
/// Gets the underlying Surreal client.
/// </summary>
ISurrealDbClient Client { get; }
/// <summary>
/// Connects and selects namespace/database exactly once.
/// </summary>
Task InitializeAsync(CancellationToken cancellationToken = default);
/// <summary>
/// Executes a raw SurrealQL statement.
/// </summary>
Task<SurrealDbResponse> RawQueryAsync(string query,
IReadOnlyDictionary<string, object?>? parameters = null,
CancellationToken cancellationToken = default);
/// <summary>
/// Checks whether the embedded client responds to health probes.
/// </summary>
Task<bool> HealthAsync(CancellationToken cancellationToken = default);
}