DuckDbConfiguration
A class that is being used to initialize the necessary settings for the DuckDBConnection object.
This class exposes the UseDuckDb() extension method of GlobalConfiguration, which wires up all the necessary dependencies for DuckDB (via DuckDbBootstrap).
Usability
GlobalConfiguration
.Setup()
.UseDuckDb();
Call this once during application start-up, before opening any
DuckDBConnection.
addDefaultHandlers
An overload accepts an addDefaultHandlers argument (defaults to true), which controls whether the default type-level property handlers — DuckDbStreamToByteArrayPropertyHandler (byte[]) and DuckDbTimeOnlyToTimeSpanPropertyHandler (TimeSpan) — are mapped.
GlobalConfiguration
.Setup()
.UseDuckDb(addDefaultHandlers: false);
Pass
falseto register your own handlers forbyte[]and/orTimeSpanproperties instead of the defaults. PropertyHandlerMapper.Add throws aMappingExistsExceptionif a type-level mapping already exists andforceis not set, so leaving the defaults in place and callingAddagain withoutforce: truewill fail.