Changes for version 0.62 - 2026-02-25
- NEW FEATURES
- Added as_subselect_rs() method for wrapping queries as subselects. Correctly preserves column lists from the original ResultSet. When you select a subset of columns, the subselect will only include those columns, not all columns from the table. This enables complex query patterns with derived tables, limited subqueries, and multi-stage aggregations.
- Added support for empty SELECT lists (select => []). Generates database-appropriate SQL: "SELECT FROM table" for PostgreSQL, "SELECT 1 FROM table" for other databases. This addresses compatibility with PostgreSQL's column-less SELECT syntax and resolves the limitation inherited from DBIx::Class core.
- Added DBIx::Class::Async::Exception, a structured exception class hierarchy consistent with the DBIx::Class::Exception interface. Exceptions stringify to their message, support boolean overload, and provide throw/rethrow.
- Added DBIx::Class::Async::Exception::Factory to translate raw DBIx::Class error strings into typed exception objects automatically, including improved diagnostics (relationship name passed as undef column value). Loading Factory is sufficient for all internal use -- it loads the base class and all subclasses as part of its own initialisation.
- Each exception subclass lives in its own file, individually loadable via use/require and properly indexed on MetaCPAN:
- DBIx::Class::Async::Exception::RelationshipAsColumn
- DBIx::Class::Async::Exception::NotInStorage
- DBIx::Class::Async::Exception::MissingColumn
- DBIx::Class::Async::Exception::NoSuchRelationship
- DBIx::Class::Async::Exception::AmbiguousColumn
- ENHANCEMENTS
- Enhanced as_query() to detect and handle empty column selection, generating optimal SQL for each database backend.
- _call_worker now derives result_class from the payload's source_name at the top of the method, making it available to both the pre-flight validation and all three post-worker error paths without any change to the call signature. Pre-flight validation in _call_worker catches (undef relationship key in create/update hashref) before the request reaches the worker pool, returning a typed Future->fail immediately.
- TESTS
- Added comprehensive tests for empty select list SQL generation, condition handling, and execution in t/152-sql-consistency.t.
- Added t/exception.t covering throw/rethrow/overload behaviour for the base class and all subclasses, Factory pattern matching, and passthrough of unrecognised errors. Tests use mock schema/source objects and require no live database connection.
- DOCUMENTATION
- Documented empty SELECT list support with usage examples and database-specific behavior in search() method POD.
Modules
Non-blocking, multi-worker asynchronous wrapper for DBIx::Class
Base class for DBIx::Class::Async exceptions
Exception for column names that are ambiguous across joined tables
Translate raw DBIx::Class errors into typed exception objects
Exception for absent required columns on insert
Exception for undeclared relationship names used in queries
Exception for operations on un-inserted row objects
Exception for relationship name passed where a column was expected
Non-blocking resultset proxy with Future-based execution
Asynchronous pagination handling for Async ResultSets
Asynchronous operations on a single ResultSource column
Asynchronous Row object representing a single database record.
Non-blocking, worker-pool based Proxy for DBIx::Class::Schema
Storage Layer for DBIx::Class::Async
DBI-based async storage backend for DBIx::Class::Async
Asynchronous cursor for DBIx::Class ResultSets using Futures