feature = "spatial", the crate exposes DuckDB’s spatial ST_* functions as typed Diesel DSL.
Unlike the rest of the DSL, these are not in the dsl::* prelude — import them from
better_duck_diesel::spatial::*. GEOMETRY values travel as WKB, so geometry arguments and results are
typed Binary.
Loading the extension
ensure_loaded(conn) installs and loads DuckDB’s spatial extension at runtime. Call it once per
connection before using any ST_* function.
Functions
feature = "spatial" carries no extra Rust dependencies — it only gates this module. The ST_*
functions are plain SQL and the geometry round-trips as WKB Binary.See also
Feature flags
What
spatial enables.Pooling
ensure_loaded per pooled connection.Extensions (core)
Loading DuckDB extensions at the driver level.
DSL overview
The non-spatial DSL.