DBIx-Class-Async
view release on metacpan or search on metacpan
0.51 2026-02-03
- Bumped version as PAUSE was unhappy with previous tar ball.
0.50 2026-02-03
[MAJOR ARCHITECTURAL OVERHAUL]
- Complete rewrite of the Storage and Persistence layer to use a
decoupled "Bridge & Worker" architecture.
- Implementation of DBIx::Class::Async::Row lifecycle management:
* Introduced "Dirty" column tracking to minimise SQL UPDATE payloads.
* Added shadow-key optimisation for high-speed attribute access.
* Robust AUTOLOAD mechanism for transparent ResultSet/Row interaction.
- Enhanced Race Condition Recovery:
* find_or_create() now handles unique constraint collisions
automatically via a catch-and-retry strategy.
- Improved Memory & Process Management:
* Weakened schema references in Storage to prevent worker leaks.
* Refined worker pool lifecycle (connect/disconnect) for cleaner
shutdowns in event-loop environments.
- Streaming Support:
* Introduced DBIx::Class::Async::Storage::DBI::Cursor for
non-blocking, memory-efficient iteration over large result sets.
lib/DBIx/Class/Async/SelectNormaliser.pm view on Meta::CPAN
=over 4
=item *
B<Requires no upstream changes.> The transformation happens entirely in
DBIx::Class::Async before the attrs touch SQL::Abstract.
=item *
B<Is transparent to callers.> Application code that already uses the
canonical C<select>/C<as> form is unaffected. Callers who prefer the
C<-ident> form get intuitive, correct behaviour.
=item *
B<Is safe to compose.> Function hashrefs (C<< { count => 'me.id' } >>) are
detected by the absence of C<-ident> and passed through untouched, so all
existing query patterns continue to work.
=item *
lib/DBIx/Class/Async/Storage/DBI.pm view on Meta::CPAN
access is not available in async mode.
my $storage = $schema->storage;
my $dbh = $storage->dbh; # Always undef in async mode
if (!defined $dbh) {
say "Running in async mode - no direct DBH access";
}
If you need to perform database operations, use the L<DBIx::Class::Async::ResultSet>
and L<DBIx::Class::Async::Row> methods which handle async execution transparently
through the worker pool.
=cut
sub dbh {
my $self = shift;
# In Async mode, the parent process doesn't hold a DBH.
# The workers hold the DBHs.
return undef;
}
lib/DBIx/Class/Async/Storage/DBI/Cursor.pm view on Meta::CPAN
=head1 DESCRIPTION
This module implements an asynchronous cursor abstraction for
L<DBIx::Class> ResultSets backed by DBI storage.
It fetches rows from a ResultSet incrementally in fixed-size batches
(pages) and exposes a C<next> method that returns a L<Future>.
Each call to C<next> resolves to a single row object or C<undef>
when the result set has been exhausted.
The cursor maintains an internal buffer and transparently issues
paginated queries using the ResultSet's C<page> and C<rows>
attributes.
This class is primarily intended for use by asynchronous storage
layers or consumers that wish to process large result sets without
loading all rows into memory at once.
=cut
=head1 CONSTRUCTOR
( run in 2.015 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )