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) (whatwg r3210)

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) (whatwg
r3210)

Diffs for this change per section: 
http://people.w3.org/mike/diffs/html5/webstorage/Overview.1.43.html#dom-sqltransaction-sync-executesql
http://people.w3.org/mike/diffs/html5/webstorage/Overview.1.43.html#status-of-this-document
http://people.w3.org/mike/diffs/html5/webstorage/Overview.1.43.html#database-query-results
http://people.w3.org/mike/diffs/html5/webstorage/Overview.1.43.html#dom-sqltransaction-sync-rollback
http://people.w3.org/mike/diffs/html5/webstorage/Overview.1.43.html#dom-sqltransaction-sync-commit
http://people.w3.org/mike/diffs/html5/webstorage/Overview.1.43.html#sqltransactionsync
http://people.w3.org/mike/diffs/html5/webstorage/Overview.1.43.html#editor-s-draft-date-1-january-1970

http://people.w3.org/mike/diffs/html5/webstorage/Overview.diff.html
http://dev.w3.org/cvsweb/html5/webstorage/Overview.html?r1=1.42&r2=1.43&f=h
http://html5.org/tools/web-apps-tracker?from=3209&to=3210

===================================================================
RCS file: /sources/public/html5/webstorage/Overview.html,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- Overview.html 11 May 2009 23:52:03 -0000 1.42
+++ Overview.html 6 Jun 2009 03:16:52 -0000 1.43
@@ -151,7 +151,7 @@
    <h1>Web Storage</h1>
    <!--ZZZ:-->
    <!--<h2 class="no-num no-toc">W3C Working Draft 23 April 2009</h2>-->
-   <h2 class="no-num no-toc" id="editor-s-draft-date-1-january-1970">Editor's Draft 11 May 2009</h2>
+   <h2 class="no-num no-toc" id="editor-s-draft-date-1-january-1970">Editor's Draft 6 June 2009</h2>
    <!--:ZZZ-->
    <dl><!-- ZZZ: update the month/day (twice), (un)comment out
     <dt>This Version:</dt>
@@ -219,7 +219,7 @@
   specification's progress along the W3C Recommendation track.
   <!--ZZZ:-->
   <!--This specification is the 23 April 2009 Working Draft.-->
-  This specification is the 11 May 2009 Editor's Draft.
+  This specification is the 6 June 2009 Editor's Draft.
   <!--:ZZZ-->
   </p><!-- required patent boilerplate --><p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5
   February 2004 W3C Patent Policy</a>. W3C maintains a <a href="http://www.w3.org/2004/01/pp-impl/42538/status" rel="disclosure">public list of
@@ -1016,6 +1016,7 @@
 interface <dfn id="sqltransactionsync">SQLTransactionSync</dfn> {
   <a href="#sqlresultset">SQLResultSet</a> <a href="#dom-sqltransaction-sync-executesql" title="dom-sqltransaction-sync-executeSql">executeSql</a>(in DOMString sqlStatement, [Optional] in <a href="#objectarray">ObjectArray</a> arguments);
   void <a href="#dom-sqltransaction-sync-commit" title="dom-sqltransaction-sync-commit">commit</a>();
+  void <a href="#dom-sqltransaction-sync-rollback" title="dom-sqltransaction-sync-rollback">rollback</a>();
 };</pre><p>A <code><a href="#sqltransactionsync">SQLTransactionSync</a></code> object is initially <i title="">fresh</i>, but it will be marked as <i title="">stale</i>
   once it has been committed or rolled back.<p>When the <dfn id="dom-sqltransaction-sync-executesql" title="dom-sqltransaction-sync-executeSql"><code>executeSql(<var title="">sqlStatement</var>, <var title="">arguments</var>)</code></dfn> method is invoked, the user
   agent must run the following algorithm:<ol><li><p>If the <code><a href="#sqltransactionsync">SQLTransactionSync</a></code> object is <i title="">stale</i>, then throw an <code>INVALID_STATE_ERR</code>
@@ -1060,6 +1061,12 @@
    <li><p>If an error occurred in the committing of the transaction,
    throw a <code><a href="#sqlexception">SQLException</a></code> exception.</li>
 
+  </ol><hr><p>When the <dfn id="dom-sqltransaction-sync-rollback" title="dom-sqltransaction-sync-rollback"><code>rollback()</code></dfn>
+  method is invoked, the user agent must run the following
+  algorithm:<ol><li><p>Rollback the transaction.</li>
+
+   <li><p>Mark the <code><a href="#sqltransactionsync">SQLTransactionSync</a></code> object as <i title="">stale</i>.</p>
+
   </ol><p>If a <code><a href="#sqltransactionsync">SQLTransactionSync</a></code> object is garbage collected
   while still <i title="">fresh</i>, the user agent must rollback the
   transaction.<h3 id="database-query-results"><span class="secno">4.6 </span>Database query results</h3><p>The <code title="dom-sqltransaction-executeSql"><a href="#dom-sqltransaction-executesql">executeSql()</a></code>

Received on Saturday, 6 June 2009 03:17:46 UTC