s.p.Transactor(AccessBroker) : class documentation
I do the hands-on work of (potentially) non-blocking database access for the persistence of array elements within a uniquely-identified group.
My methods return Twisted deferred instances to the results of their database accesses rather than forcing the client code to block while the database access is being completed.
|Method||__init__||Instantiates me for a three-dimensional array of elements within a particular group uniquely identified by the supplied integer ID, using a database connection to url.|
|Method||startup||You can run my transaction methods when the deferred returned from this method fires, and not before.|
|Method||load||Element load transaction|
|Method||update||Element overwrite (entry update) transaction|
|Method||insert||Element add (entry insert) transaction|
|Method||delete||Element delete transaction|
|Method||clear||Transaction to clear all elements (Use with care!)|
Inherited from AccessBroker:
|Instance Variable||q||A property-generated reference to a threaded task queue that is dedicated to my database connection.|
|Instance Variable||connection||The current SQLAlchemy connection object, if any yet exists. Generated by
|Class Method||setup||Constructs a global queue for all instances of me, returning a deferred that fires with it.|
|Method||callWhenRunning||Calls the f-args-kw combo when the broker is running and ready for transactions.|
|Method||table||Instantiates a new table object, creating it in the transaction thread as needed.|
|Method||shutdown||Shuts down my database transaction functionality and threaded task
queue, returning a
|Method||s||Polymorphic method for working with
|Method||select||Just returns an
|Method||selex||Supply columns as arguments and this method generates a select on the columns, yielding a placeholder object with the same attributes as the select object itself.|
|Method||sql||Executes raw SQL as a transaction, in my thread with my current connection, with any rows of the result returned as a list.|
|Method||deferToQueue||Dispatches callable(*args, **kw) as a task via the like-named
method of my asynchronous queue, returning a
Instantiates me for a three-dimensional array of elements within a particular group uniquely identified by the supplied integer ID, using a database connection to url.
You can run my transaction methods when the deferred returned from this method fires, and not before.