Problem
Firebird is not supported. There is no Firebird plugin among the 31 bundles in Plugins/, and no firebird reference anywhere in the repo. Asked for in discussion #2257.
Firebird still runs under a lot of older desktop and ERP deployments, and TablePlus does not support it either, so it is one of the few relational engines where we would be ahead rather than catching up. Demand so far is one user, so this is a backlog item, not urgent.
Proposed solution
A registry-only FirebirdDriverPlugin, with the wire protocol written in Swift as Packages/TableProCore/Sources/TableProFirebirdCore, the same split TeradataDriverPlugin + TableProTeradataCore uses (#1888).
Scope for v1:
- Firebird 3.0, 4.0 and 5.0 over TCP 3050, wire protocol 13 and up
- Auth:
Srp256 and Srp
- Wire encryption: ChaCha, ChaCha64 and Arc4
- Browse, query, edit, structure, DDL, export and import through the standard driver surface
Work breakdown
Protocol core:
- XDR reader and writer, op codes for protocol 13 through 19
op_connect / op_accept_data / op_attach handshake, including the multi step auth exchange
- SRP-6a (
Srp256, Srp). BigUInt.modPow already exists in TableProTeradataCore and moves to a shared target
- Wire encryption. Firebird 3.0 defaults
WireCrypt to Enabled and 4.0 defaults it to Required, so a driver without it cannot reach a stock 4.0 or 5.0 server. SRP hands over a 160 bit key and ChaCha takes the first 128 bits of it
- BLR message descriptions for parameters and result rows
- Statement prepare, execute, fetch, and the blob round trips (
op_open_blob2, op_get_segment)
- Type decoding: NUMERIC and DECIMAL as scaled integers, DATE and TIMESTAMP as modified Julian, DECFLOAT and INT128 on 4.0, per column charsets including NONE
Plugin:
- Schema reads over
RDB$RELATIONS, RDB$RELATION_FIELDS, RDB$FIELDS, RDB$INDICES, RDB$RELATION_CONSTRAINTS, RDB$TRIGGERS, RDB$PROCEDURES
- Pagination with
ROWS, or OFFSET/FETCH on 4.0 and up
- Identifier quoting, including the unquoted-folds-to-upper rule
- One connection is one database file, so the tree is flat like SQLite and DuckDB. Firebird 6.0 adds SQL schemas (
RDB$SCHEMAS); leave room for that instead of designing it in now
Wiring: DatabaseType constant plus allKnownTypes and iconName, target in project.yml, entry in PluginMetadataRegistry+RegistryDefaults.swift, case arm in the Resolve plugin info step of build-plugin.yml, icon asset, docs/databases/firebird.mdx, row in docs/index.mdx, CHANGELOG.
Alternatives considered
Link libfbclient. On macOS it installs as a system framework at /Library/Frameworks/Firebird.framework, so users would have to install Firebird themselves. Bundling it instead means building a static universal slice that Firebird does not support building, and it pulls in ICU, libtommath, libtomcrypt and a C++ runtime. The only thing it buys is embedded .fdb files.
Rust bridge over rsfbclient with its pure Rust backend, the shape Native/DamengBridge uses. Workable, but the crate's wire encryption support is not documented, which is the one part we cannot ship without. Would need to be verified before choosing it.
Risks
- Wire encryption is a gate, not an extra. Easiest part of the estimate to get wrong
- The official wire protocol spec (v0.18) says it is incomplete and that higher protocol versions are only partially described.
nakagami/firebirdsql (Go, MIT), Jaybird and node-firebird are the cross checks
- Firebird 2.5 uses protocol 10 to 12 and legacy auth, a separate code path. Left out of v1
- Embedded
.fdb with no server cannot work over a socket driver. Needs to be stated in the docs
Testing
Unit tests over the codecs and auth vectors, matching how TableProTeradataCoreTests covers Teradata (BigUIntTests, RecordDecoderDecimalTests, TeradataExecuteLoopTests). CI runs no database services, so server verification is manual against Firebird 3.0, 4.0 and 5.0 in Docker.
Out of scope for v1
Firebird 2.5, embedded databases, events, services API (backup and restore), array columns.
Problem
Firebird is not supported. There is no Firebird plugin among the 31 bundles in
Plugins/, and nofirebirdreference anywhere in the repo. Asked for in discussion #2257.Firebird still runs under a lot of older desktop and ERP deployments, and TablePlus does not support it either, so it is one of the few relational engines where we would be ahead rather than catching up. Demand so far is one user, so this is a backlog item, not urgent.
Proposed solution
A registry-only
FirebirdDriverPlugin, with the wire protocol written in Swift asPackages/TableProCore/Sources/TableProFirebirdCore, the same splitTeradataDriverPlugin+TableProTeradataCoreuses (#1888).Scope for v1:
Srp256andSrpWork breakdown
Protocol core:
op_connect/op_accept_data/op_attachhandshake, including the multi step auth exchangeSrp256,Srp).BigUInt.modPowalready exists inTableProTeradataCoreand moves to a shared targetWireCryptto Enabled and 4.0 defaults it to Required, so a driver without it cannot reach a stock 4.0 or 5.0 server. SRP hands over a 160 bit key and ChaCha takes the first 128 bits of itop_open_blob2,op_get_segment)Plugin:
RDB$RELATIONS,RDB$RELATION_FIELDS,RDB$FIELDS,RDB$INDICES,RDB$RELATION_CONSTRAINTS,RDB$TRIGGERS,RDB$PROCEDURESROWS, orOFFSET/FETCHon 4.0 and upRDB$SCHEMAS); leave room for that instead of designing it in nowWiring:
DatabaseTypeconstant plusallKnownTypesandiconName, target inproject.yml, entry inPluginMetadataRegistry+RegistryDefaults.swift,casearm in theResolve plugin infostep ofbuild-plugin.yml, icon asset,docs/databases/firebird.mdx, row indocs/index.mdx, CHANGELOG.Alternatives considered
Link
libfbclient. On macOS it installs as a system framework at/Library/Frameworks/Firebird.framework, so users would have to install Firebird themselves. Bundling it instead means building a static universal slice that Firebird does not support building, and it pulls in ICU, libtommath, libtomcrypt and a C++ runtime. The only thing it buys is embedded.fdbfiles.Rust bridge over
rsfbclientwith its pure Rust backend, the shapeNative/DamengBridgeuses. Workable, but the crate's wire encryption support is not documented, which is the one part we cannot ship without. Would need to be verified before choosing it.Risks
nakagami/firebirdsql(Go, MIT), Jaybird and node-firebird are the cross checks.fdbwith no server cannot work over a socket driver. Needs to be stated in the docsTesting
Unit tests over the codecs and auth vectors, matching how
TableProTeradataCoreTestscovers Teradata (BigUIntTests,RecordDecoderDecimalTests,TeradataExecuteLoopTests). CI runs no database services, so server verification is manual against Firebird 3.0, 4.0 and 5.0 in Docker.Out of scope for v1
Firebird 2.5, embedded databases, events, services API (backup and restore), array columns.