Skip to content

Commit 25364b7

Browse files
authored
fix(plugins)!: SQL Server tables on connect, cell-edit datetime, chip parity; PluginKit ABI 10→11 (#1183)
* fix(plugins)!: SQL Server tables on connect, cell-edit datetime, chip parity; PluginKit ABI 10→11 * wip * fix(plugin-mssql): tighten datetime parser; revert xcstrings drift; add test coverage; oracle switchDatabase override * fix(plugin-mssql): skip IDENTITY columns from INSERT
1 parent a21022d commit 25364b7

46 files changed

Lines changed: 990 additions & 104 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7474

7575
### Fixed
7676

77+
- Tables in the sidebar now load automatically after a slow connect. SQL Server connections previously showed "No Tables" until the user manually picked a schema; the same race could affect other engines on slow networks. The post-connect listener now triggers the schema load once the driver is bound.
78+
- SQL Server `switchDatabase` now actually switches the database (`USE <database>`) instead of being routed through a schema switch. Switching from a saved tab pointing at a different database used to overwrite the current schema with the database name and leave the table list empty until the user manually re-picked a schema.
79+
- SQL Server cell edits now save without "Conversion failed when converting date and/or time from character string." Tables with primary keys use a PK-only WHERE clause (no longer including every column), and DATETIME / DATETIME2 / SMALLDATETIME values round-trip as ISO 8601 instead of FreeTDS's `MMM d yyyy h:mm:ss:fffAM` format that SQL Server's parser rejects.
80+
- SQL Server INSERTs skip IDENTITY columns automatically. Adding a new row no longer fails with "Cannot insert explicit value for identity column ... when IDENTITY_INSERT is set to OFF". The server allocates the value and TablePro omits the column from the INSERT.
81+
- Toolbar database/schema chip reflects the correct unit from the moment a connection is established. SQL Server, PostgreSQL, Oracle, and BigQuery connections show the active schema; MySQL, SQLite, Redis, and other database-grouped engines show the active database.
82+
- SQL Server connections use the server-reported default schema (`SELECT SCHEMA_NAME()`) rather than a hardcoded `dbo`, so users with a non-default schema in `sys.database_principals` see their tables on connect. The connection form's Schema field still acts as an explicit override.
7783
- Holding Cmd+Return at safe-mode level `.silent` no longer stacks two confirmation sheets and runs the dangerous query twice. The `.silent` branch in `QueryExecutionCoordinator.dispatchStatements` and `dispatchParameterizedStatements` now sets the same `isShowingSafeModePrompt` re-entry flag synchronously that the `requiresConfirmation` branch already used; the flag is cleared in a `defer` inside the spawned `Task`.
7884
- LSP `cancelRequest` no longer leaks a pending continuation when the underlying transport is mid-shutdown. The previous `try? writeMessage(data)` swallowed the failure, leaving the local handler stuck waiting for a response the LSP server would never produce. The new path logs the failure and resolves the pending entry with `CancellationError`, so AI inline-suggestion / Copilot LSP teardown no longer leaks completion handlers across the lifetime of the LSP process.
7985
- Plugin auto-update no longer drops new rejection entries that arrive from concurrent operations (e.g., a manual install failure during the auto-update loop). `PluginManager.autoUpdateRejectedPlugins` previously snapshotted `rejectedPlugins` at entry, looped through awaits that could mutate it, then assigned the stale snapshot back at the end. The fix replaces only the entries it processed and preserves any concurrent additions.

Plugins/BigQueryDriverPlugin/BigQueryPluginDriver.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,7 @@ internal final class BigQueryPluginDriver: PluginDatabaseDriver, @unchecked Send
531531
func generateStatements(
532532
table: String,
533533
columns: [String],
534+
primaryKeyColumns: [String],
534535
changes: [PluginRowChange],
535536
insertedRowData: [Int: [String?]],
536537
deletedRowIndices: Set<Int>,

Plugins/BigQueryDriverPlugin/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
<plist version="1.0">
44
<dict>
55
<key>TableProPluginKitVersion</key>
6-
<integer>10</integer>
6+
<integer>11</integer>
77
</dict>
88
</plist>

Plugins/CSVExportPlugin/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<plist version="1.0">
44
<dict>
55
<key>TableProPluginKitVersion</key>
6-
<integer>10</integer>
6+
<integer>11</integer>
77
<key>TableProProvidesExportFormatIds</key>
88
<array>
99
<string>csv</string>

Plugins/CassandraDriverPlugin/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>NSPrincipalClass</key>
2222
<string>$(PRODUCT_MODULE_NAME).CassandraPlugin</string>
2323
<key>TableProPluginKitVersion</key>
24-
<integer>10</integer>
24+
<integer>11</integer>
2525
</dict>
2626
</plist>

Plugins/ClickHouseDriverPlugin/ClickHousePlugin.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,7 @@ final class ClickHousePluginDriver: PluginDatabaseDriver, @unchecked Sendable {
601601
func generateStatements(
602602
table: String,
603603
columns: [String],
604+
primaryKeyColumns: [String],
604605
changes: [PluginRowChange],
605606
insertedRowData: [Int: [String?]],
606607
deletedRowIndices: Set<Int>,

Plugins/ClickHouseDriverPlugin/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<plist version="1.0">
44
<dict>
55
<key>TableProPluginKitVersion</key>
6-
<integer>10</integer>
6+
<integer>11</integer>
77
<key>TableProProvidesDatabaseTypeIds</key>
88
<array>
99
<string>ClickHouse</string>

Plugins/CloudflareD1DriverPlugin/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
<plist version="1.0">
44
<dict>
55
<key>TableProPluginKitVersion</key>
6-
<integer>10</integer>
6+
<integer>11</integer>
77
</dict>
88
</plist>

Plugins/DuckDBDriverPlugin/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
<plist version="1.0">
44
<dict>
55
<key>TableProPluginKitVersion</key>
6-
<integer>10</integer>
6+
<integer>11</integer>
77
</dict>
88
</plist>

Plugins/DynamoDBDriverPlugin/DynamoDBPluginDriver.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,7 @@ internal final class DynamoDBPluginDriver: PluginDatabaseDriver, @unchecked Send
484484
func generateStatements(
485485
table: String,
486486
columns: [String],
487+
primaryKeyColumns: [String],
487488
changes: [PluginRowChange],
488489
insertedRowData: [Int: [String?]],
489490
deletedRowIndices: Set<Int>,

0 commit comments

Comments
 (0)