Closed screendriver closed 7 years ago
Assuming tx
is the object returned by helper.newBatchTransaction()
, you can abort a transaction with something like this:
tx.abort();
In the current "API" tx.abort()
does not return a promise. In this library tx.abort()
would basically drop the SQL statement list from the internal state and then return control to the caller.
Ok. As I said in https://github.com/mobilexag/win-uwp-frame/issues/7 please add this if possible for consistency.
I just updated both this version and the original @brodybits version so that tx.abort()
will return a promise that is already resolved after clearing the internal state. This would properly support the case in your original question. This is now published to npm. Please let me know if this works as desired or not.
Is it possible to abort an transaction? Like
I didn't just tried it out because it's a little bit difficult at the moment to provoke an error.