861a1d1df0
Walks schemas -> tables/views -> columns via ISqlDialect's catalog SQL, with @schema/@table bound as parameters at every level. Column leaves carry the dialect-mapped DriverDataType in the attribute side-panel (ViewOnly, read-only v1). The NodeId encoding deliberately departs from the design sketch's literal `schema.table|column`: SQL Server permits `.` and `|` inside a quoted identifier, so that form mis-parses (main.a.b|c reads equally as schema `main`+table `a.b` and schema `main.a`+table `b`) and silently binds an operator's tag to the wrong column. SqlBrowseNodeId encodes `<kind>:<part>[|<part>...]` with `\`/`|` escaped and the kind prefix carrying the arity; it is public because the picker body decodes it back. The session owns the connection it is handed and closes it on dispose -- the registry-held session is the only lifetime hook, so a non-owning session would leak one pooled connection per reaped picker. Per-call work stays bounded by the AdminUI's existing 20s linked CTS (BrowserSessionService.PerCallTimeout); no second deadline is invented here. Claude-Session: https://claude.ai/code/session_01GASWkNEi68FSCtvr6rLoEW
51 lines
2.7 KiB
XML
51 lines
2.7 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
<PropertyGroup>
|
|
<TargetFramework>net10.0</TargetFramework>
|
|
<Nullable>enable</Nullable>
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
<IsPackable>false</IsPackable>
|
|
<IsTestProject>true</IsTestProject>
|
|
<RootNamespace>ZB.MOM.WW.OtOpcUa.Driver.Sql.Browser.Tests</RootNamespace>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="xunit.v3"/>
|
|
<PackageReference Include="Shouldly"/>
|
|
<!--
|
|
TEST-ONLY, same rationale as Driver.Sql.Tests: SQLite is the offline substrate that lets the
|
|
schema browser run against a real DbConnection (real parameter binding, real catalog rows) with
|
|
no SQL Server and no network. No product project references SQLite. The bundle_e_sqlite3 line is
|
|
the surgical direct pin that promotes the native bundle to 2.1.12, outside the
|
|
CVE-2025-6965 / GHSA-2m69-gcr7-jv3q range Microsoft.Data.Sqlite's transitive 2.1.11 sits in.
|
|
-->
|
|
<PackageReference Include="Microsoft.Data.Sqlite"/>
|
|
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3"/>
|
|
<PackageReference Include="Microsoft.NET.Test.Sdk"/>
|
|
<PackageReference Include="xunit.runner.visualstudio">
|
|
<PrivateAssets>all</PrivateAssets>
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
</PackageReference>
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<ProjectReference Include="..\..\..\src\Drivers\ZB.MOM.WW.OtOpcUa.Driver.Sql.Browser\ZB.MOM.WW.OtOpcUa.Driver.Sql.Browser.csproj"/>
|
|
<ProjectReference Include="..\..\..\src\Drivers\ZB.MOM.WW.OtOpcUa.Driver.Sql\ZB.MOM.WW.OtOpcUa.Driver.Sql.csproj"/>
|
|
<ProjectReference Include="..\..\..\src\Drivers\ZB.MOM.WW.OtOpcUa.Driver.Sql.Contracts\ZB.MOM.WW.OtOpcUa.Driver.Sql.Contracts.csproj"/>
|
|
<ProjectReference Include="..\..\..\src\Core\ZB.MOM.WW.OtOpcUa.Commons\ZB.MOM.WW.OtOpcUa.Commons.csproj"/>
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<!--
|
|
LINKED, not duplicated. SqliteDialect is the only non-SQL-Server ISqlDialect in the tree and is
|
|
therefore the falsifiability control for the whole seam: it proves the browser runs the *dialect's*
|
|
catalog SQL rather than INFORMATION_SCHEMA with a quoting function attached. Linking the one file
|
|
(rather than referencing Driver.Sql.Tests) keeps a second copy from drifting while avoiding a
|
|
test-project-to-test-project reference. The file is public + self-contained for exactly this reason
|
|
— see its class docs.
|
|
-->
|
|
<Compile Include="..\ZB.MOM.WW.OtOpcUa.Driver.Sql.Tests\SqliteDialect.cs" Link="SqliteDialect.cs"/>
|
|
</ItemGroup>
|
|
|
|
</Project>
|