Releases for RepoDb.Firebird
View the NuGet package here or download it directly here.
RepoDb.Firebird (v0.0.1-alpha) - Preview
Released: TBA
New
First (alpha) release of the Firebird provider for RepoDB, built on top of FirebirdSql.Data.FirebirdClient. Targets Firebird 3.0 and later, and netstandard2.0, .NET 8, .NET 9, and .NET 10.
What’s included
- FirebirdBootstrap / FirebirdConfiguration
.UseFirebird()— initializes RepoDB for use withFbConnection(GlobalConfiguration.Setup().UseFirebird()), mapping the FirebirdDbSetting, FirebirdDbHelper, and FirebirdStatementBuilder to everyFbConnection. - FirebirdDbSetting — Firebird-specific behavior:
"for opening/closing identifier quotes,@parameter prefix, no table hints, no multi-statement command text support (IsMultiStatementExecutable = false), and a lowerMaxParameterCountof1500(Firebird’s DSQL parser rejects anIN (...)list past roughly 1500 members). - FirebirdStatementBuilder — generates Firebird-flavored SQL for every operation:
FIRST n/FIRST m SKIP npaging for Query/Exists/BatchQuery/skip-take queries, a nativeRETURNINGclause for identity/primary-key retrieval on Insert,UPDATE OR INSERT INTO ... MATCHING (...) RETURNING ...(Firebird’s native upsert) for Merge/MergeAll — falling back to anEXECUTE BLOCKPL/SQL construct when the identity column is itself a qualifier — and a plainDELETE FROM tfor Truncate, since Firebird has noTRUNCATE TABLEstatement. - FirebirdDbHelper — schema/type discovery (
GetFields/GetFieldsAsync) sourced fromRDB$RELATION_FIELDS/RDB$FIELDS, with identity-column detection viaRDB$IDENTITY_TYPE(Firebird 3.0+ only).GetScopeIdentity/GetScopeIdentityAsyncalways throwNotSupportedException, since Firebird has no session-wide “last identity” construct. - Resolvers — FirebirdConvertFieldResolver (casts a field to its Firebird type when a conversion is needed, e.g. typed ExecuteQuery results, and widens integer Average/AverageAll casts to
DOUBLE PRECISIONsince Firebird’sAVG()otherwise truncates), FirebirdDbTypeNameToClientTypeResolver (maps the canonical type-name strings produced by FirebirdDbHelper to .NET CLR types), and DbTypeToFirebirdStringNameResolver (mapsSystem.Data.DbTypeto Firebird SQL type names, e.g.DbType.Guid→CHAR(16) CHARACTER SET OCTETS). - Parameter attributes mirroring
FbParametermembers, settable per entity property: Charset, FbDbType, SourceColumn, SourceColumnNullMapping, and SourceVersion.
Known limitations (v1)
- No dedicated bulk-operations package — InsertAll, MergeAll and UpdateAll are the only options for writing multiple rows, and since
IsMultiStatementExecutableisfalse, each one issues a separate round trip per row rather than a single batched statement. Passing an explicitbatchSizegreater than1to any of them throws aNotSupportedException. - Firebird 2.5 and earlier are not supported. Identity-column introspection relies on
RDB$RELATION_FIELDS.RDB$IDENTITY_TYPE/RDB$GENERATOR_NAME, which do not exist prior to Firebird 3.0 — a table whose auto-increment behavior is implemented the pre-3.0 way (aBEFORE INSERTtrigger plus a bare generator/sequence) is not detected as an identity column. - No table hints of any kind —
AreTableHintsSupportedisfalse; passing a non-nullhintsargument to any operation throws aNotSupportedException. - No session-wide scope identity — GetScopeIdentity/
GetScopeIdentityAsyncalways throwNotSupportedException. Use the value already returned by Insert/Merge viaRETURNING, or query the underlying generator explicitly (e.g.GEN_ID(generator_name, 0)) if you need it out-of-band. - No
TRUNCATE TABLEstatement (as of Firebird 5.0) — Truncate compiles toDELETE FROM twithout aWHEREclause, which, unlike a real truncate, does not reset aGENERATED ... AS IDENTITYcolumn’s next value. MaxParameterCountdefaults to1500, lower than the2098most other providers default to, since Firebird’s DSQL parser rejects anIN (...)list past roughly 1500 members with"Implementation limit exceeded".- Merge/MergeAll compile to a single plain
UPDATE OR INSERTstatement only when the identity column (if any) is not itself a qualifier; when it is, anEXECUTE BLOCKPL/SQL construct is used instead, sinceMATCHINGcannot reliably match a not-yet-inserted row against its own not-yet-known identity value. - No native GUID type — a
Guidentity property maps toCHAR(16) CHARACTER SET OCTETS; there is currently no dedicated property handler equivalent to other providers’GuidToByteArrayPropertyHandler. Only a standard networked Firebird 3.0+ server (SuperServer) accessed via
FirebirdSql.Data.FirebirdClientis tested against — embedded (fbembed) and Classic/SuperClassic server modes are not specifically verified.- Referenced the
RepoDbpackagev1.16.0. - Referenced the
FirebirdSql.Data.FirebirdClientpackagev10.3.4.