NAME
DBIx::QuickORM::Dialect::DuckDB - DuckDB dialect for DBIx::QuickORM.
DESCRIPTION
The DuckDB-specific DBIx::QuickORM::Dialect. DuckDB is an embedded engine (a file or :memory:, no server), so this dialect closely mirrors DBIx::QuickORM::Dialect::SQLite. It introspects schema metadata from DuckDB's pragma_table_info and duckdb_constraints() / duckdb_indexes() functions plus information_schema, drives transactions via the driver, and reports DuckDB's feature set (RETURNING on all DML, no async support, no savepoints).
SYNOPSIS
my $dialect = DBIx::QuickORM::Dialect::DuckDB->new(dbh => $dbh, db_name => $name);
CAVEATS
- No savepoints
-
DuckDB does not implement
SAVEPOINT, so the savepoint methodscroak. Top-level transactions work; nested ORM transactions (which are implemented as savepoints) are not supported on DuckDB. - No async
-
DuckDB has no async query support; the
async_*methodscroak.
PUBLIC METHODS
- $ver = $dialect->fallback_ver
- $ver = $dialect->oldest_ver
- $ver = $dialect->latest_ver
- $driver = $dialect->dbi_driver
- $name = $dialect->dialect_name
- $bool = $dialect->supports_returning_update
- $bool = $dialect->supports_returning_insert
- $bool = $dialect->supports_returning_delete
- $bool = $dialect->async_supported
- $bool = $dialect->async_cancel_supported
- $bool = $dialect->version_search
-
Feature flags and constants describing the DuckDB dialect. DuckDB has no versioned dialect variants and does not support async queries.
- $dialect->async_prepare_args
- $dialect->async_ready
- $dialect->async_result
- $dialect->async_cancel
-
DuckDB does not support async queries; these
croak. - $version = $dialect->db_version
-
The DuckDB engine version (from
SELECT version()). - $dialect->start_txn(%params)
- $dialect->commit_txn(%params)
- $dialect->rollback_txn(%params)
-
Transaction control via the DuckDB driver. Each accepts an optional
dbhparameter, defaulting to the dialect's own handle. - $dialect->create_savepoint(%params)
- $dialect->commit_savepoint(%params)
- $dialect->rollback_savepoint(%params)
-
DuckDB does not support savepoints; these
croak. - $dsn = $dialect->dsn($db)
-
Builds a DuckDB DSN string from a database config object.
SCHEMA INTROSPECTION
- $tables = $dialect->build_tables_from_db(%params)
-
Introspects all tables and views in the current schema and returns a hashref of name to schema-table object.
- ($pk, $unique, $links) = $dialect->build_table_keys_from_db($table, %params)
-
Introspects a table's primary key, unique keys, and foreign-key links via
duckdb_constraints(). - $columns = $dialect->build_columns_from_db($table, %params)
-
Introspects a table's columns via
pragma_table_info(SQLite-compatible in DuckDB) and returns a hashref of column name to column object. - $indexes = $dialect->build_indexes_from_db($table, %params)
-
Returns an arrayref of index specs. Primary-key and unique indexes come from
duckdb_constraints(); named secondary indexes (with their columns and unique flag) come fromduckdb_indexes()(theexpressionscolumn gives the column list).
SOURCE
The source code repository for DBIx::QuickORM can be found at https://github.com/exodist/DBIx-QuickORM.
MAINTAINERS
AUTHORS
COPYRIGHT
Copyright Chad Granum <exodist7@gmail.com>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.