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 false to register your own handlers for byte[] and/or TimeSpan properties instead of the defaults. PropertyHandlerMapper.Add throws a MappingExistsException if a type-level mapping already exists and force is not set, so leaving the defaults in place and calling Add again without force: true will fail.