Repository navigation
Flatten | DbMetaDataFactory -> SqlMetaDataFactory - #3818
Conversation
SqlConnectionFactory always passed the same value to both parameters
Convert the list of unsupported engines to a static variable. Make the UDT/TVP processing methods static. Change name of constants and ServerVersion parameter to fit naming conventions. Introduce constant for EngineEdition query. Reuse SqlCommand where possible. Remove layer of indentation for using block. Remove redundant client-side checks for null on fields which are declared as non-nullable within SQL Server. Slightly simplify building of assembly qualified names. Convert checks whether columns exist in a DataTable (and DataTables in a DataSet) to debug assertions, since these are statically built now.
Move constants which were only used in one method to that method. Replace an unnecessary string[] allocation with a stack-allocated ReadOnlySpan<string>. Where appropriate, use ?.. Replace == null and != null with pattern matching. Convert checks whether columns exist in a DataTable (and DataTables in a DataSet) to debug assertions, since these are statically built now. Replace use of GetSchemaTable with GetColumnSchema to reduce allocations. Where appropriate, make methods private and/or static. Remove unnecessary ADP.CompareInsensitiveInvariant helper. Simplify IncludeThisColumn to make use of Contains or IndexOf where necessary.
Also implement IDisposable on SqlMetaDataFactory
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3818 +/- ##
===========================================
- Coverage 90.82% 69.12% -21.70%
===========================================
Files 6 267 +261
Lines 316 66325 +66009
===========================================
+ Hits 287 45849 +45562
- Misses 29 20476 +20447
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@edwardneal - Can you try merging main? We have made changes to the dependencies that may fix the one build error. |
|
Thanks @paulmedynski, I've just merged. |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
@edwardneal - Some conflicts to resolve here, and then I'll kick off a new CI run. |
|
Thanks @paulmedynski, I've just re-merged. |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
benrr101
left a comment
There was a problem hiding this comment.
Thanks @edwardneal ! 🚀 🚢
Description
This continues some of the earlier work from #3435, which replaced a layer of inheritance between
DbConnectionFactoryandSqlConnectionFactory, and #3773, which does the same betweenSqlInternalConnectionandSqlInternalConnectionTds.Here, we remove
DbMetaDataFactoryand fold its responsibilities intoSqlMetaDataFactory. These are comparatively large files, so it's simplest to move commit-by-commit with whitespace changes hidden. I proceed in stages:protectedandprivateas appropriate.)Issues
No associated issues.
Testing
Automated tests continue to pass.