Replace BLite with Surreal embedded persistence
All checks were successful
NuGet Package Publish / nuget (push) Successful in 1m21s
All checks were successful
NuGet Package Publish / nuget (push) Successful in 1m21s
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user