[Repo Assist] chore: minor code clarity improvements#456
Draft
github-actions[bot] wants to merge 2 commits intomasterfrom
Draft
[Repo Assist] chore: minor code clarity improvements#456github-actions[bot] wants to merge 2 commits intomasterfrom
github-actions[bot] wants to merge 2 commits intomasterfrom
Conversation
- SqlClientExtensions.fs: reorder UDTT column query ORDER BY to group by table type first, then by column position within each type (tt.user_type_id, c.column_id). The previous order (c.column_id, tt.user_type_id, c.user_type_id) produced the same result but was less readable. Also removes the redundant c.user_type_id tie-breaker. - SqlEnumProvider.fs: remove two stale commented-out lines that were never used (ProvidedAssembly created per-instantiation in the lambda instead, at line 66). - Configuration.fs: remove outdated 'this is mess' TODO comment. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Mar 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This is an automated PR from Repo Assist.
Three small readability/cleanup changes with no behaviour impact.
Changes
src/SqlClient.DesignTime/SqlClientExtensions.fsThe SQL query that retrieves UDTT columns used
ORDER BY c.column_id, tt.user_type_id, c.user_type_id. The primary sort key (c.column_id) is the column's position within a UDTT; the group key (tt.user_type_id) was secondary. While this produced correct results (becauseArray.groupBypreserves insertion order and each UDTT's columns appeared incolumn_idorder in every group), the intent was not clear at a glance.Changed to
ORDER BY tt.user_type_id, c.column_id: group by table type first, then by column position — which directly expresses "for each table type, return columns in definition order". The redundantc.user_type_idtie-breaker (column's own type ID) was also removed since(tt.user_type_id, c.column_id)uniquely identifies each row.src/SqlClient.DesignTime/SqlEnumProvider.fsRemoved two stale commented-out lines:
A
ProvidedAssemblyis already created per-instantiation inside theinstantiationFunctionlambda (line 66 / 266 in the original). The module-level draft was never activated.src/SqlClient/Configuration.fsRemoved
//this is mess. Clean up later.— a stale TODO comment from an early version of the file. TheFsharpDataSqlClientConfigurationrecord +lock-guarded mutablecurrentis straightforward as-is.Test Status
Build: ✅
dotnet build src/SqlClient/SqlClient.fsproj -f netstandard2.0succeeds — only pre-existing deprecation warnings (97), no new errors.Full integration tests require a SQL Server instance and could not be run in this environment. All three changes are pure cleanup with no logic change, so regression risk is minimal.