def interact(self, interaction, callback, errback): """Interact with the database. Arguments: * interaction: a callable object which takes 1 argument; a transaction. The callable object presented here will be executed in an arbitrary thread. 'callback' will be made in the main thread upon success and 'errback' will be called upon failure. If 'callback' is called, that means that the transaction was committed; if 'errback', it was rolled back. This does not apply in databases which do not support transactions. """ threadtask.dispatch(callback, errback, self._runInteraction, interaction)
def query(self, qstr, callback, errback, eater=None, chunkSize=1): threadtask.dispatch(callback, errback, self._runQuery, qstr, eater, chunkSize)