HTML Standard Tracker


File a bug

SVNBugCommentTime (UTC)
3210Add 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)2009-06-06 03:16
@@ -61120,20 +61120,21 @@ interface <dfn>SQLStatementErrorCallback</dfn> {
   and <code
   methods return <code>SQLTransactionSync</code> objects.</p>
   <pre class="idl">// typedef sequence&lt;any> <span>ObjectArray</span>;
 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>();
   <p>A <code>SQLTransactionSync</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>
   <p>When the <dfn
   title="">sqlStatement</var>, <var
   title="">arguments</var>)</code></dfn> method is invoked, the user
@@ -61192,20 +61193,36 @@ interface <dfn>SQLTransactionSync</dfn> {
    <li><p>If appropriate (i.e. if the <code
    method created the <code>SQLTransactionSync</code> object), invoke
    the <i>postcommit operation</i>.</p>
    <li><p>If an error occurred in the committing of the transaction,
    throw a <code>SQLException</code> exception.</p></li>
+  <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
   <h5>Database query results</h5>
   <p>The <code title="dom-sqltransaction-executeSql">executeSql()</code>
   method invokes its callback with a <code>SQLResultSet</code> object