DBIO::DuckDB

DuckDB driver for DBIO (modern embedded analytical database).

Supports

Usage

package MyApp::DB;
use base 'DBIO::Schema';
__PACKAGE__->load_components('DuckDB');

my $schema = MyApp::DB->connect('dbi:duckdb:myapp.db');

For in-memory database:

my $schema = MyApp::DB->connect('dbi:duckdb:');

DBIO core autodetects dbi:duckdb: DSNs and loads this storage automatically.

DuckDB Features

Types

Arrow Integration

Parquet Support

DuckDB-Specific Features

Introspection

Deploy

DBIO::DuckDB::Deploy orchestrates test-deploy-and-compare:

  1. Introspect live database via DuckDB information schema (DBIO::DuckDB::Introspect)
  2. Deploy desired schema to a temporary in-memory database
  3. Introspect the temporary database the same way
  4. Diff source vs target (DBIO::DuckDB::Diff)

DuckDB's speed makes deploy-and-compare very fast even for large schemas.

Install (install_ddl) creates fresh schema. Upgrade diffs live vs. desired.

Testing

export DBIO_TEST_DUCKDB_DSN="dbi:duckdb:"
prove -l t/

DuckDB in-memory mode requires no external process - perfect for testing.

Requirements

See Also

DBIO::Introspect::Base, DBIO::Diff::Base, DBIO::Deploy

Repository

https://codeberg.org/dbio/dbio-duckdb