sasync.selex.SelectAndResultHolder(object)
class documentation
Part of sasync.selex
(View In Hierarchy)
I am yielded by database.AccessBroker.selectorator
to let you work on (1) a select
of the provided columns or (2)
an object produced by a callable and any args for it, then call me for its
result.
Provide my constructor with a reference to the database.AccessBroker
and the args, plus any keywords you want added to the call.
Everything is cleaned up via my close
method after the "loop" ends.
Method | __init__ | Undocumented |
Method | __getattr__ | No summary |
Method | __call__ | Executes the select object, with any supplied args and
keywords. |
Method | close | Closes the ResultProxy if possible. |
Method | _wrapper | Replaces the select object with the result of a method of
it that you obtained as an attribute of me. Henceforth my attributes shall
be those of the replacement object. |
Replaces the select
object with the result of a method of
it that you obtained as an attribute of me. Henceforth my attributes shall
be those of the replacement object.
Access an attribute of my select
object (or a replacement
obtained via a method call) as if it were my own. If the attribute is
callable, wrap it in my magic object-replacement wrapper method.
Executes the select
object, with any supplied args and
keywords.
If you call this from within a transaction already, the nesting will be
dealt with appropriately and you will get an immediate
ResultProxy
. Otherwise, you'll get a deferred that fires with
the result, with row iteration coolness.
As with any transaction, you can disable such behavior and get either
the raw ResultProxy
(with raw) or a list of rows (with
asList). Those transaction keywords can get supplied to my
constructor or to this call, if it doesn't itself occur from inside a
transaction.