DBIx-QuickORM

 view release on metacpan or  search on metacpan

lib/DBIx/QuickORM/Manual/Async.pm  view on Meta::CPAN


=head2 async - driver-level asynchronous

    my $h = $orm->handle('events', {processed => 0});
    my $iter = $h->async->iterator;    # query is sent, does not block

This uses the database driver's own asynchronous support. The query runs on
your B<primary> connection while your code keeps going. It is the cheapest
option - no extra connection, no extra process - but it has the strictest
constraints (see L</"RULES AND CONSTRAINTS"> below), because the one connection
is busy until the query finishes.

Not every database supports this. If the dialect does not advertise async
support (for example L<DBD::SQLite>), selecting C<async> and running a query
throws an exception. Use C<forked> instead on those backends.

=head2 aside - asynchronous on a separate connection

    my $iter = $h->aside->iterator;

An C<aside> query is the same driver-level async mechanism, but run on a



( run in 2.524 seconds using v1.01-cache-2.11-cpan-d7a12ab2c7f )