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 @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- DuckDB schema reads handle apostrophes and concurrent schema switches correctly
- DuckDB ENUMs in non-`main` schemas resolve correctly
- DuckDB `DATE` and `TIMESTAMP` BC years use a leading minus
- `.db`, `.db3`, `.s3db`, `.sl3`, and `.sqlitedb` files now open in TablePro from Finder (#1327)

## [0.43.0] - 2026-05-18

Expand Down
2 changes: 1 addition & 1 deletion Plugins/SQLiteDriverPlugin/SQLitePlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ final class SQLitePlugin: NSObject, TableProPlugin, DriverPlugin {
static let pathFieldRole: PathFieldRole = .filePath
static let connectionMode: ConnectionMode = .fileBased
static let urlSchemes: [String] = ["sqlite"]
static let fileExtensions: [String] = ["db", "sqlite", "sqlite3"]
static let fileExtensions: [String] = ["db", "db3", "s3db", "sl3", "sqlite", "sqlite3", "sqlitedb"]
static let brandColorHex = "#003B57"
static let supportsDatabaseSwitching = false
static let databaseGroupingStrategy: GroupingStrategy = .flat
Expand Down
2 changes: 1 addition & 1 deletion TablePro/Core/Plugins/PluginMetadataRegistry.swift
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ final class PluginMetadataRegistry: @unchecked Sendable {
immutableColumns: [],
systemDatabaseNames: [],
systemSchemaNames: [],
fileExtensions: ["db", "sqlite", "sqlite3"],
fileExtensions: ["db", "db3", "s3db", "sl3", "sqlite", "sqlite3", "sqlitedb"],
databaseGroupingStrategy: .flat,
structureColumnFields: [.name, .type, .nullable, .defaultValue, .autoIncrement, .comment]
),
Expand Down
12 changes: 7 additions & 5 deletions TablePro/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,20 @@
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>sqlite</string>
<string>sqlite3</string>
<string>db</string>
<string>db3</string>
<string>s3db</string>
<string>sl3</string>
<string>sqlite</string>
<string>sqlite3</string>
<string>sqlitedb</string>
</array>
<key>CFBundleTypeName</key>
<string>SQLite Database</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Default</string>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>com.apple.sqlite3</string>
Expand Down Expand Up @@ -172,11 +173,12 @@
<dict>
<key>public.filename-extension</key>
<array>
<string>sqlite</string>
<string>sqlite3</string>
<string>db</string>
<string>db3</string>
<string>s3db</string>
<string>sl3</string>
<string>sqlite</string>
<string>sqlite3</string>
<string>sqlitedb</string>
</array>
</dict>
Expand Down
3 changes: 2 additions & 1 deletion TableProMobile/TableProMobile/Views/ConnectionFormView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ struct ConnectionFormView: View {
// MARK: - Helpers

private var sqliteContentTypes: [UTType] {
[UTType.database, UTType(filenameExtension: "sqlite3") ?? .data, .data]
let extensions = ["db", "db3", "s3db", "sl3", "sqlite", "sqlite3", "sqlitedb"]
return [UTType.database] + extensions.compactMap { UTType(filenameExtension: $0) } + [.data]
}
}
28 changes: 28 additions & 0 deletions TableProTests/Plugins/SQLiteFileExtensionsTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//
// SQLiteFileExtensionsTests.swift
// TableProTests
//

import Foundation
@testable import TablePro
import Testing

@MainActor
@Suite("SQLite file extension registration")
struct SQLiteFileExtensionsTests {
private static let canonical: [String] = ["db", "db3", "s3db", "sl3", "sqlite", "sqlite3", "sqlitedb"]

@Test("Plugin metadata registry exposes the canonical SQLite extensions")
func registryHasCanonicalExtensions() throws {
let snapshot = try #require(PluginMetadataRegistry.shared.snapshot(forTypeId: "SQLite"))
#expect(snapshot.schema.fileExtensions.sorted() == Self.canonical.sorted())
}

@Test("URLClassifier resolves every canonical extension to the SQLite database type")
func urlClassifierResolvesEveryExtension() {
let extensionMap = PluginManager.shared.allRegisteredFileExtensions
for ext in Self.canonical {
#expect(extensionMap[ext] != nil, "extension \(ext) is not registered")
}
}
}
Loading