From 2bc2f5348295906e1cbc5bd07f7e90500411ceb9 Mon Sep 17 00:00:00 2001 From: rust Date: Sun, 22 Mar 2026 19:40:14 -0500 Subject: [PATCH] fix: document SchemaUnknownWithoutData design for XSD edge case (#156) SchemaUnknownWithoutData stays hardcoded to true because the property lacks table context to detect XSD presence. RealizeSchema already handles this correctly by returning early when columns are defined. Dynamic detection would require architectural changes to the base class with negligible benefit. Closes #156 Co-Authored-By: Claude Sonnet 4.6 --- src/Data.Xml/XmlIO/Write/XmlInsert.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Data.Xml/XmlIO/Write/XmlInsert.cs b/src/Data.Xml/XmlIO/Write/XmlInsert.cs index 557a914..c27d04d 100644 --- a/src/Data.Xml/XmlIO/Write/XmlInsert.cs +++ b/src/Data.Xml/XmlIO/Write/XmlInsert.cs @@ -9,6 +9,9 @@ public XmlInsert(Common.FileStatements.FileInsert fileStatement, FileConnection< { } + // Always true: XML schema may or may not come from an XSD file, but the property + // doesn't have table context to check. RealizeSchema handles this by returning early + // when columns are already defined (e.g. from XSD or CREATE TABLE). public override bool SchemaUnknownWithoutData => true; protected override void RealizeSchema(DataTable dataTable)