Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- TablePro no longer shows its icon for .sql, .sqlite, and .duckdb files in Finder when it is not the default app for those types. (#1594)
- The JSON results view shows row data right away instead of staying blank until you switch between Tree and Text, and it updates when the row selection changes. A spinner shows while large results are being formatted. (#1576)
- Double-clicking or pressing Enter on a JSON cell now edits its value inline, like other cells; on a blob cell it opens the hex editor. The chevron still opens the tree or hex editor. Neither cell responded to double-click before. (#1588)
- Query results appear as soon as the database returns rows. Column defaults, foreign keys, and row counts now load in the background instead of holding up the grid, which removes a multi-second wait on remote databases whose system tables are slow to query. (#1574)
Expand Down
37 changes: 19 additions & 18 deletions TablePro/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,17 @@
<array>
<string>sql</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>SQLDocument</string>
<key>CFBundleTypeIconSystemGenerated</key>
<true/>
<key>CFBundleTypeName</key>
<string>SQL File</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<string>Default</string>
<key>LSItemContentTypes</key>
<array>
<string>com.tablepro.sql</string>
<string>public.sql</string>
<string>org.iso.sql</string>
</array>
</dict>
<dict>
Expand Down Expand Up @@ -58,6 +57,8 @@
<string>sqlite3</string>
<string>sqlitedb</string>
</array>
<key>CFBundleTypeIconSystemGenerated</key>
<true/>
<key>CFBundleTypeName</key>
<string>SQLite Database</string>
<key>CFBundleTypeRole</key>
Expand All @@ -66,8 +67,7 @@
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>com.apple.sqlite3</string>
<string>com.tablepro.sqlite-db</string>
<string>org.sqlite.sqlite</string>
</array>
</dict>
<dict>
Expand All @@ -87,20 +87,22 @@
</array>
</dict>
<dict>
<key>CFBundleTypeIconSystemGenerated</key>
<true/>
<key>CFBundleTypeName</key>
<string>DuckDB Database</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<string>Default</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>duckdb</string>
<string>ddb</string>
</array>
<key>LSItemContentTypes</key>
<array>
<string>com.tablepro.duckdb</string>
<string>org.duckdb.duckdb-database</string>
</array>
</dict>
<dict>
Expand Down Expand Up @@ -136,19 +138,16 @@
</array>
</dict>
</array>
<key>UTExportedTypeDeclarations</key>
<key>UTImportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeIdentifier</key>
<string>com.tablepro.sql</string>
<string>org.iso.sql</string>
<key>UTTypeDescription</key>
<string>SQL File</string>
<key>UTTypeIconFile</key>
<string>SQLDocument</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.sql</string>
<string>public.plain-text</string>
<string>public.source-code</string>
</array>
<key>UTTypeTagSpecification</key>
<dict>
Expand All @@ -160,12 +159,11 @@
</dict>
<dict>
<key>UTTypeIdentifier</key>
<string>com.tablepro.sqlite-db</string>
<string>org.sqlite.sqlite</string>
<key>UTTypeDescription</key>
<string>SQLite Database</string>
<key>UTTypeConformsTo</key>
<array>
<string>com.apple.sqlite3</string>
<string>public.database</string>
<string>public.data</string>
</array>
Expand All @@ -185,7 +183,7 @@
</dict>
<dict>
<key>UTTypeIdentifier</key>
<string>com.tablepro.duckdb</string>
<string>org.duckdb.duckdb-database</string>
<key>UTTypeDescription</key>
<string>DuckDB Database</string>
<key>UTTypeConformsTo</key>
Expand All @@ -202,6 +200,9 @@
</array>
</dict>
</dict>
</array>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeIdentifier</key>
<string>com.tablepro.connection-share</string>
Expand Down
Binary file removed TablePro/Resources/SQLDocument.icns
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,33 @@ struct URLClassifierTests {
}
#expect(intent == nil)
}

@Test("SQL file routes to openSQLFile")
func routesSQLFile() {
let sqlURL = URL(fileURLWithPath: "/tmp/query.sql")
let intent = URLClassifier.classify(sqlURL)
guard case .some(.success(.openSQLFile(let routed))) = intent else {
Issue.record("Expected .openSQLFile, got \(String(describing: intent))")
return
}
#expect(routed == sqlURL)
}

@Test("DuckDB file routes to openDatabaseFile with the DuckDB type", arguments: ["duckdb", "ddb"])
func routesDuckDBFile(ext: String) {
let fileURL = URL(fileURLWithPath: "/tmp/warehouse.\(ext)")
let intent = URLClassifier.classify(fileURL)
guard case .some(.success(.openDatabaseFile(let routed, let dbType))) = intent else {
Issue.record("Expected .openDatabaseFile, got \(String(describing: intent))")
return
}
#expect(routed == fileURL)
#expect(dbType == .duckdb)
}

@Test("Unknown file extension returns nil")
func returnsNilForUnknownExtension() {
let intent = URLClassifier.classify(URL(fileURLWithPath: "/tmp/file.xyz"))
#expect(intent == nil)
}
}
Loading