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 with DuckDBConnection (GlobalConfiguration.Setup().UseDuckDb()), mapping the DuckDbDbSetting, DuckDbDbHelper, and DuckDbStatementBuilder to every DuckDBConnection, and registering DuckDbStreamToByteArrayPropertyHandler as the default handler for BLOB reads.
  • DuckDbDbSetting — DuckDB-specific behavior: "-quoted identifiers, $ parameter prefix/placeholder sigil, main default schema, no table hints, no native UPSERT keyword (Merge is built via INSERT ... ON CONFLICT DO UPDATE instead), and multi-statement command text support (IsMultiStatementExecutable = true, MultiStatementSeparator = ";").
  • DuckDbStatementBuilder — generates DuckDB-flavored SQL for every operation: LIMIT/LIMIT ... OFFSET paging for BatchQuery/skip-take queries and top-N Query, INSERT ... ON CONFLICT DO UPDATE for Merge/MergeAll, and identity/primary-key retrieval via a RETURNING clause appended to Insert/InsertAll/Merge/MergeAll — DuckDB has no session-scoped “last identity” function.
  • DuckDbDbHelper — schema/type discovery (GetFields/GetFieldsAsync) sourced from information_schema.columns, joined against duckdb_constraints() for primary-key detection and a sequence-backed DEFAULT (nextval(...)) for identity detection (DuckDB has no native AUTO_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 (maps information_schema.columns.data_type values to .NET CLR types, including HUGEINT/UHUGEINT to BigInteger).
  • 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/GetScopeIdentityAsync throw NotSupportedException; identity values are always retrieved via the RETURNING clause instead, so this only matters to code calling DuckDbDbHelper directly.
  • DuckDB.NET.Data.Full only supports net8.0 and later — unlike most other providers in this ecosystem, there is no .NET Standard 2.0 build.

Bumps

  • Referenced the RepoDb package v1.17.0-alpha3.
  • References the DuckDB.NET.Data.Full package v1.5.5.