DuckDB
This page contains the latest information of the releases of RepoDb.DuckDb library.
View the NuGet package here or download it directly here.
RepoDb.DuckDb (v0.0.1-alpha1) - Preview
Released: TBA
New
First (alpha) release of the dedicated DuckDB provider for RepoDB, built on top of DuckDB.NET. #1348
What’s included
DuckDbBootstrap/DuckDbConfiguration.UseDuckDb()— initializes RepoDB for use withDuckDBConnection(GlobalConfiguration.Setup().UseDuckDb()), mapping theDuckDbDbSetting,DuckDbDbHelper, andDuckDbStatementBuilderto everyDuckDBConnection, and registering DuckDbStreamToByteArrayPropertyHandler as the default handler forBLOBreads.DuckDbDbSetting— DuckDB-specific behavior:"-quoted identifiers,$parameter prefix/placeholder sigil,maindefault schema, no table hints, no nativeUPSERTkeyword (Merge is built viaINSERT ... ON CONFLICT DO UPDATEinstead), and multi-statement command text support (IsMultiStatementExecutable = true,MultiStatementSeparator = ";").DuckDbStatementBuilder— generates DuckDB-flavored SQL for every operation:LIMIT/LIMIT ... OFFSETpaging for BatchQuery/skip-take queries and top-N Query,INSERT ... ON CONFLICT DO UPDATEfor Merge/MergeAll, and identity/primary-key retrieval via aRETURNINGclause appended to Insert/InsertAll/Merge/MergeAll — DuckDB has no session-scoped “last identity” function.DuckDbDbHelper— schema/type discovery (GetFields/GetFieldsAsync) sourced frominformation_schema.columns, joined againstduckdb_constraints()for primary-key detection and a sequence-backedDEFAULT(nextval(...)) for identity detection (DuckDB has no nativeAUTO_INCREMENT). It also strips the$sigil from every ad-hoc parameter’s name after creation, to match DuckDB.NET’s bare-name binding convention.- Resolver —
DuckDbTypeNameToClientTypeResolver(mapsinformation_schema.columns.data_typevalues to .NET CLR types, includingHUGEINT/UHUGEINTtoBigInteger). - Property handlers — DuckDbStreamToByteArrayPropertyHandler (
BLOB, auto-registered), DuckDbDateOnlyToDateTimePropertyHandler / DuckDbDateOnlyToNullableDateTimePropertyHandler (DATE), and DuckDbTimeOnlyToTimeSpanPropertyHandler / DuckDbTimeOnlyToNullableTimeSpanPropertyHandler (TIME). - Parameter attributes mirroring
DuckDBParameter, settable per entity property: SourceColumn, SourceColumnNullMapping, and SourceVersion. - Targets .NET 8, .NET 9, and .NET 10.
Known limitations (v1)
- No bulk operations package — DuckDB is embedded/in-process, so use InsertAll, MergeAll and UpdateAll for batching instead.
- No stored procedure support — DuckDB has no equivalent construct.
IDbHelper.GetScopeIdentity/GetScopeIdentityAsyncthrowNotSupportedException; identity values are always retrieved via theRETURNINGclause instead, so this only matters to code calling DuckDbDbHelper directly.DuckDB.NET.Data.Fullonly supportsnet8.0and later — unlike most other providers in this ecosystem, there is no .NET Standard 2.0 build.
Bumps
- Referenced the
RepoDbpackagev1.17.0-alpha3. - References the
DuckDB.NET.Data.Fullpackagev1.5.5.