Commit 45a4937
authored
Flatten | DbMetaDataFactory -> SqlMetaDataFactory (#3818)
* Remove unnecessary references to DbMetaDataFactory
* Remove unnecessary cacheMetaDataFactory parameter and logic
* Remove unused capability to provide normalized server version
SqlConnectionFactory always passed the same value to both parameters
* Convert CollectionDataSet property to auto-property
* Cleanup of SqlMetaDataFactory prior to merge
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.
* Cleanup of DbMetaDataFactory prior to merge
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.
* Merge logic to create CollectionDataSet
* Merge Dispose logic
Also implement IDisposable on SqlMetaDataFactory
* Merge DataTable population method
* Merge ExecuteCommand population method
* Merge top-level GetSchema method
* Merge SupportedByCurrentVersion and properties, remove now-unused base class methods
* Replace unnecessary private properties with variables
* Remove DbMetaDataFactory1 parent 6b047ab commit 45a4937
File tree
8 files changed
+785
-966
lines changed- src/Microsoft.Data.SqlClient
- netcore/src
- netfx/src
- src/Microsoft/Data
- Common
- ProviderBase
- SqlClient
- ConnectionPool
8 files changed
+785
-966
lines changedLines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | 212 | | |
216 | 213 | | |
217 | 214 | | |
| |||
Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | 285 | | |
289 | 286 | | |
290 | 287 | | |
| |||
Lines changed: 1 addition & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1129 | 1129 | | |
1130 | 1130 | | |
1131 | 1131 | | |
1132 | | - | |
1133 | | - | |
1134 | | - | |
1135 | 1132 | | |
1136 | 1133 | | |
1137 | 1134 | | |
| |||
1142 | 1139 | | |
1143 | 1140 | | |
1144 | 1141 | | |
1145 | | - | |
1146 | | - | |
1147 | | - | |
1148 | 1142 | | |
1149 | 1143 | | |
1150 | 1144 | | |
| |||
1231 | 1225 | | |
1232 | 1226 | | |
1233 | 1227 | | |
1234 | | - | |
| 1228 | + | |
1235 | 1229 | | |
1236 | 1230 | | |
1237 | 1231 | | |
| |||
1268 | 1262 | | |
1269 | 1263 | | |
1270 | 1264 | | |
1271 | | - | |
1272 | | - | |
1273 | 1265 | | |
1274 | 1266 | | |
1275 | 1267 | | |
| |||
1287 | 1279 | | |
1288 | 1280 | | |
1289 | 1281 | | |
1290 | | - | |
1291 | | - | |
1292 | 1282 | | |
1293 | 1283 | | |
1294 | 1284 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
860 | 860 | | |
861 | 861 | | |
862 | 862 | | |
863 | | - | |
| 863 | + | |
864 | 864 | | |
865 | 865 | | |
866 | 866 | | |
| |||
0 commit comments