| 12345678910111213141516171819202122232425262728293031 |
- namespace Admin.NET.Plugin.AiDOP.DataPlatform.Core.Connectors;
- /// <summary>Trusted host plugin. Dialect, identifier quoting, type mapping and ordered
- /// parameterized reads belong to the driver. Resolve the secret only within the supplied binding.</summary>
- public interface IRelationalSourceDriver
- {
- string ConnectorId { get; }
- string ConnectorVersion { get; }
- Task<IRelationalReadSession> OpenReadOnlyAsync(
- ConnectorExecution execution, string secretRef, CancellationToken cancellationToken);
- }
- /// <summary>One source connection. Probe the effective permissions and ordering capabilities
- /// of this connection. An unverifiable permission or capability must be reported as false.</summary>
- public interface IRelationalReadSession : IAsyncDisposable
- {
- Task<RelationalReadCapabilities> ProbeAsync(CancellationToken cancellationToken);
- /// <summary>Read at most BatchSize rows after the supplied committed position, using the
- /// authorized dataset mapping. A nonempty page transfers ownership of its payload to the caller
- /// (valid after disposal of the session). Return null at end of input. Reading never commits a position.</summary>
- Task<ConnectorBatchCandidate?> ReadPageAsync(ConnectorReadRequest request, CancellationToken cancellationToken);
- }
- public sealed record RelationalReadCapabilities(bool ReadOnly, bool Full, bool Incremental)
- {
- public string? Reason { get; init; }
- }
- public sealed record RelationalReadBatch(ConnectorFrozenBatch Batch, bool HasMore);
|