Skip to content

Commit

Permalink
[] (0) Add a .rollback() method for the sync database API, so you don…
Browse files Browse the repository at this point in the history
…'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 f30feb3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions source
Expand Up @@ -61127,6 +61127,7 @@ interface <dfn>SQLStatementErrorCallback</dfn> {
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
Expand Down Expand Up @@ -61199,6 +61200,22 @@ interface <dfn>SQLTransactionSync</dfn> {

</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>
Expand Down

0 comments on commit f30feb3

Please sign in to comment.