Skip to content
Permalink
Browse files

[] (0) Add a .rollback() method for the sync database API, so you don…

…'t have to depend on GC if you want to give up a transaction. (credit: ap)

git-svn-id: http://svn.whatwg.org/webapps@3210 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Jun 6, 2009
1 parent 12ab7ac commit f30feb3fcee22cc4440c03b7ea5e45375da7ea1f
Showing with 17 additions and 0 deletions.
  1. +17 −0 source
17 source
interface <dfn>SQLTransactionSync</dfn> {
<span>SQLResultSet</span> <span title="dom-sqltransaction-sync-executeSql">executeSql</span>(in DOMString sqlStatement, [Optional] in <span>ObjectArray</span> arguments);
void <span title="dom-sqltransaction-sync-commit">commit</span>();
void <span title="dom-sqltransaction-sync-rollback">rollback</span>();
};</pre>

<p>A <code>SQLTransactionSync</code> object is initially <i

</ol>

<hr>

<p>When the <dfn
title="dom-sqltransaction-sync-rollback"><code>rollback()</code></dfn>
method is invoked, the user agent must run the following
algorithm:</p>

<ol>

<li><p>Rollback the transaction.</p></li>

<li><p>Mark the <code>SQLTransactionSync</code> object as <i
title="">stale</i>.</p>

</ol>

<p>If a <code>SQLTransactionSync</code> object is garbage collected
while still <i title="">fresh</i>, the user agent must rollback the
transaction.</p>

0 comments on commit f30feb3

Please sign in to comment.
You can’t perform that action at this time.