NAME
DBIx::QuickORM::STH::Async - Driver-level asynchronous statement handle.
DESCRIPTION
A DBIx::QuickORM::STH subclass for queries running asynchronously at the driver level. The result is deferred: ready polls the driver and result blocks until the result arrives. Finalizing the handle releases the async slot on the owning connection, and (where the dialect supports it) an in-flight query can be cancelled.
SYNOPSIS
$sth->wait;
while (my $row_hr = $sth->next) { ... }
ATTRIBUTES
- got_result
-
The driver result once it has arrived; absent until then.
- invalidated
-
True once the owning connection has reconnected out from under this handle, closing the driver handle it was running on.
PUBLIC METHODS
- $bool = $sth->deferred_result
-
Always true: the result is fetched lazily.
- $bool = $sth->cancel_supported
-
True when the dialect supports cancelling an in-flight async query.
- $sth->clear
-
Release the async slot on the owning connection.
- $bool = $sth->invalidated
- $sth->mark_invalidated
- $sth->finalize_invalidated
-
Reconnect support. A driver-level async query runs on the connection's shared database handle; if the connection reconnects (or disconnects) before the result is collected, that handle is closed and the query can never complete.
mark_invalidatedflags this handle (the connection calls it duringreconnect),invalidatedreports the flag, andfinalize_invalidateddrives the handle to its terminal state without touching the dead driver handle. Once invalidated,readyandresultcroak rather than call the closed driver. - $sth->cancel
-
Cancel the in-flight query (when no result has arrived yet) and finalize the handle.
- $result = $sth->result
-
Block until the driver result is available, caching and returning it.
- $bool = $sth->ready
-
Poll the driver; true once the result is available. Drains a no-row statement on first readiness.
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.