NAME
DBIO::DuckDB::Extension - The extension class of a DuckDB extension without rules
VERSION
version 0.900007
SYNOPSIS
# A schema declares the extensions its database has; nothing else is written.
__PACKAGE__->duckdb_extensions('httpfs', 'spatial');
# An extension with rules of its own names its class
__PACKAGE__->duckdb_extensions(spatial => { class => 'MyApp::DB::Extension::Spatial' });
DESCRIPTION
The extension classes of "duckdb_extensions" in DBIO::DuckDB (ADR 0066 of DBIO core). This class is the plain one: it has no rules, so a declared extension is installed and loaded and nothing else is done for it (httpfs, json, parquet, ...). It derives from DBIO::Extension, whose defaults do nothing, and states the interface version, the driver it belongs to and the one thing a DuckDB extension wants of a connection: it is LOADed ("activation"). Its name is undef on purpose: one class serves every name, and the name of the list's entry stands ("name" in DBIO::Extension).
Unlike PostgreSQL the driver ships no class for any extension: the table of the family ("family_class") is empty and every name gets this class unless the declaration names another with the option class.
METHODS
extension_interface
The interface version of DBIO::Extension, 1.
driver
DBIO::DuckDB, the assertion that is checked once the DSN has decided the driver ("check_driver" in DBIO::Extension::List).
activation
The extension is loaded on every new connection: { load => $name }, with the name of the entry ($ctx->{self}{name}). The storage turns it into INSTALL and LOAD ("_activate_extensions" in DBIO::DuckDB::Storage).
family_class
The table of the family: the empty list for every name, DuckDB has no extension the family ships a class for. The class_table "_extension_list" in DBIO::DuckDB::Deploy hands to DBIO::Extension::List.
resolve_list
my $list = DBIO::DuckDB::Extension->resolve_list($schema);
my $list = DBIO::DuckDB::Extension->resolve_list($schema, check_driver => 0);
The one place that turns the declaration of a schema (class or instance; "duckdb_extensions" in DBIO::DuckDB, duckdb_extension_classes) into a DBIO::Extension::List: the option class, else the plain class. Classes are loaded and their interface version is checked. Returns undef for a schema that declares none, and for one that does not load the DBIO::DuckDB component.
Unless check_driver is false the driver assertion of every class is checked as well ("check_driver" in DBIO::Extension::List); only the registration of the storage layers at connection passes false, since the layer is chosen before the DSN has decided anything.
AUTHOR
DBIO Authors
COPYRIGHT AND LICENSE
Copyright (C) 2026 DBIO Authors
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.