Skip to content

Refactor sidebar and fix SQL Server uniqueidentifier issues#26

Merged
tashda merged 8 commits into
mainfrom
dev
Apr 17, 2026
Merged

Refactor sidebar and fix SQL Server uniqueidentifier issues#26
tashda merged 8 commits into
mainfrom
dev

Conversation

@tashda
Copy link
Copy Markdown
Owner

@tashda tashda commented Apr 17, 2026

No description provided.

tashda and others added 8 commits April 14, 2026 12:31
…ar with new sidebar

SQL Server 2008 R2 compat:
- Gate temporal/memory-optimized SQL on serverMajorVersion from LOGINACK
  (already shipped to sqlserver-nio dev branch)

Column expansion fix (ExperimentalObjectBrowserSidebarView is now canonical):
- Add .column row case to ObjectBrowserNode so table/view nodes include
  column children when object.columns is non-empty
- Render column rows via DatabaseObjectColumnRow in ObjectBrowserRowView
- Show expand chevron on table/view rows only when columns are present
- Handle .column in all exhaustive switch statements

Freshness / snapshot fixes:
- hydrateMetadataFreshnessFromCacheStructure: mark databases as .listOnly
  when cached objects have no column data (requireColumns check) so the
  background prefetch reloads them
- Gate .live freshness only when column data is confirmed present

Sidebar consolidation:
- Remove old ObjectBrowserSidebarView (40+ view files) and its supporting
  DatabaseObjectBrowserView / DatabaseObjectRow components
- Rename ExperimentalObjectBrowserSidebarView → ObjectBrowserSidebarView
  (all Experimental* types renamed accordingly across all files)
- Both .folder and .experimentalFolder nav cases now use ObjectBrowserSidebarView
- Remove orphaned ExplorerSidebarViewModel+Replication.swift

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…WHERE clause test

Bumps sqlserver-nio to cf7d65b which fixes TDSData.uuid, SQLServerValue.init(uuid:),
and SQLServerRow.toStringArray() to correctly apply SQL Server's mixed-endian byte swap.
GUIDs displayed in the query editor were showing the wrong value; copying one into a
WHERE clause returned zero rows.

Adds testUniqueidentifierWhereClause to catch this: inserts a known UUID, reads it
back, confirms the displayed string matches the original, then queries by the displayed
value and asserts exactly one row is returned.

Also strengthens testUniqueidentifierRoundTrip to verify the actual GUID values
round-trip correctly instead of only checking count and uniqueness.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…use test

Used .nvarchar(length: .length(50)) instead of the incorrect .nvarchar with
a plain Int length argument, fixing the CI build failure.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…wserSidebarViewModel

The property was accidentally dropped during a refactor, breaking the
DatabaseSnapshotsSidebarTests build and causing CI (Light) to fail.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
hydrateMetadataFreshnessFromCacheStructure() requires at least one
table/view to have column data before marking a database as .cached.
The test fixture used the no-column default, so the "loaded" database
was always classified as .listOnly, failing the assertion.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
hydrateMetadataFreshnessFromCacheStructure uses loadedState: .live so that
databases restored from cache expand instantly without a background fetch.
The test expectation was stale (.cached).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@tashda tashda merged commit e32ae80 into main Apr 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant