feat(sql): register Sql factory + probe in Host, add DriverTypeNames.Sql
Add DriverTypeNames.Sql (+ All) as the shared source of truth, and wire the driver into the Host: register the factory in DriverFactoryBootstrap.Register via Driver.Sql.SqlDriverFactoryExtensions.Register(registry, loggerFactory), add the SqlProbe (= Driver.Sql.SqlDriverProbe) probe via TryAddEnumerable, and add the Driver.Sql project reference to the Host. Default tier A (SQL client is managed + cross-platform, so ShouldStub needs no change). Repoint the interim SqlDriver.DriverTypeName / SqlDriverFactoryExtensions.DriverTypeName literals at DriverTypeNames.Sql; both still resolve to "Sql", so the AdminUI TagConfigEditorMap/TagConfigValidator keys and the DriverTypeName-parity test stay green. The Core guard test discovers factories from its own bin, so it also gains a Driver.Sql project reference — that is the "registered-factory side" that lets DriverTypeNamesGuardTests' bidirectional-parity check pass (4/4 green). Claude-Session: https://claude.ai/code/session_01GASWkNEi68FSCtvr6rLoEW
This commit is contained in:
@@ -29,14 +29,12 @@ public sealed class SqlDriver
|
||||
: IDriver, ITagDiscovery, IReadable, ISubscribable, IHostConnectivityProbe, IAsyncDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// The driver-type string this driver registers under.
|
||||
/// <para><b>Deliberately a local constant, not <c>DriverTypeNames.Sql</c>.</b>
|
||||
/// <c>DriverTypeNamesGuardTests</c> asserts bidirectional parity between the constants and the
|
||||
/// driver factories actually registered in the process, so the constant may only be added in the
|
||||
/// same change that wires the factory (this task ships no factory — see the plan's Task 11, which
|
||||
/// adds <c>DriverTypeNames.Sql</c> and repoints this constant at it).</para>
|
||||
/// The driver-type string this driver registers under — <see cref="DriverTypeNames.Sql"/>, the single
|
||||
/// source of truth the deploy pipeline stores in <c>DriverInstance.DriverType</c> and every dispatch
|
||||
/// map keys by. Chained off the shared constant (Task 11 wired the factory + probe, so
|
||||
/// <c>DriverTypeNamesGuardTests</c>' bidirectional-parity check is satisfied).
|
||||
/// </summary>
|
||||
public const string DriverTypeName = "Sql";
|
||||
public const string DriverTypeName = DriverTypeNames.Sql;
|
||||
|
||||
/// <summary>Shown for a connection string that names no recognisable server.</summary>
|
||||
private const string UnknownEndpoint = "(unknown sql endpoint)";
|
||||
|
||||
@@ -29,12 +29,9 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.Sql;
|
||||
public static class SqlDriverFactoryExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// The driver-type string this factory registers under.
|
||||
/// <para>Chained off <see cref="SqlDriver.DriverTypeName"/> rather than <c>DriverTypeNames.Sql</c>:
|
||||
/// <c>DriverTypeNamesGuardTests</c> asserts bidirectional parity between the shared constants and the
|
||||
/// factories actually registered in the process, so the constant may only be added in the change that
|
||||
/// also wires this factory into the Host (the plan's Task 11, which repoints both at
|
||||
/// <c>DriverTypeNames.Sql</c>).</para>
|
||||
/// The driver-type string this factory registers under — chained off
|
||||
/// <see cref="SqlDriver.DriverTypeName"/>, which is
|
||||
/// <see cref="ZB.MOM.WW.OtOpcUa.Core.Abstractions.DriverTypeNames.Sql"/>.
|
||||
/// </summary>
|
||||
public const string DriverTypeName = SqlDriver.DriverTypeName;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user