[html5] r1116 - /

whatwg at whatwg.org whatwg at whatwg.org
Wed Oct 31 17:24:40 PDT 2007


Author: ianh
Date: 2007-10-31 17:24:39 -0700 (Wed, 31 Oct 2007)
New Revision: 1116

Modified:
   index
   source
Log:
[w] (2) SQL: add a success callback to transaction() and changeVersion(); make the arguments array to executeSql() optional.

Modified: index
===================================================================
--- index	2007-10-31 09:36:03 UTC (rev 1115)
+++ index	2007-11-01 00:24:39 UTC (rev 1116)
@@ -22,7 +22,7 @@
 
    <h1 id=html-5>HTML 5</h1>
 
-   <h2 class="no-num no-toc" id=working>Working Draft — 31 October 2007</h2>
+   <h2 class="no-num no-toc" id=working>Working Draft — 1 November 2007</h2>
 
    <p>You can take part in this work. <a
     href="http://www.whatwg.org/mailing-list">Join the working group's
@@ -30526,10 +30526,12 @@
    permission to increase the quota every five megabytes.
 
   <pre class=idl>interface <dfn id=database0>Database</dfn> {
-  readonly attribute DOMString <a href="#version" title=dom-database-version>version</a>;
-  void <a href="#changeversion" title=dom-database-changeVersion>changeVersion</a>(in DOMString oldVersion, in DOMString newVersion, in <a href="#sqltransactioncallback">SQLTransactionCallback</a> callback, in <a href="#sqltransactionerrorcallback">SQLTransactionErrorCallback</a> errorCallback);
   void <a href="#transaction" title=dom-database-transaction>transaction</a>(in <a href="#sqltransactioncallback">SQLTransactionCallback</a> callback);
   void <a href="#transaction" title=dom-database-transaction>transaction</a>(in <a href="#sqltransactioncallback">SQLTransactionCallback</a> callback, in <a href="#sqltransactionerrorcallback">SQLTransactionErrorCallback</a> errorCallback);
+  void <a href="#transaction" title=dom-database-transaction>transaction</a>(in <a href="#sqltransactioncallback">SQLTransactionCallback</a> callback, in <a href="#sqltransactionerrorcallback">SQLTransactionErrorCallback</a> errorCallback, in <a href="#voidcallback">VoidCallback</a> successCallback);
+
+  readonly attribute DOMString <a href="#version" title=dom-database-version>version</a>;
+  void <a href="#changeversion" title=dom-database-changeVersion>changeVersion</a>(in DOMString oldVersion, in DOMString newVersion, in <a href="#sqltransactioncallback">SQLTransactionCallback</a> callback, in <a href="#sqltransactionerrorcallback">SQLTransactionErrorCallback</a> errorCallback, in <a href="#voidcallback">VoidCallback</a> successCallback);
 };
 
 interface <dfn id=sqltransactioncallback>SQLTransactionCallback</dfn> {
@@ -30545,7 +30547,8 @@
    takes one or two arguments. When called, the method must immediately
    return and then asynchronously run the <a href="#transaction0">transaction
    steps</a> with the <i>transaction callback</i> being the first argument,
-   the <i>error callback</i> being the second argument, if any, and with no
+   the <i>error callback</i> being the second argument, if any, the
+   <i>success callback</i> being the third argument, if any, and with no
    <i>preflight operation</i> or <i>postflight operation</i>.
 
   <p>The version that the database was opened with is the <dfn id=expected
@@ -30567,7 +30570,8 @@
    must immediately return, and then asynchronously run the <a
    href="#transaction0">transaction steps</a> with the <i>transaction
    callback</i> being the third argument, the <i>error callback</i> being the
-   fourth argument, the <i>preflight operation</i> being the following:
+   fourth argument, the <i>success callback</i> being the fifth argument, the
+   <i>preflight operation</i> being the following:
 
   <ol>
    <li>
@@ -30603,6 +30607,7 @@
    class=idl>typedef sequence<Object> <dfn id=objectarray>ObjectArray</dfn>;
 
 interface <dfn id=sqltransaction>SQLTransaction</dfn> {
+  void <span title=dom-sqltransaction-executeSql>executeSql</span>(in DOMString sqlStatement);
   void <span title=dom-sqltransaction-executeSql>executeSql</span>(in DOMString sqlStatement, in <a href="#objectarray">ObjectArray</a> arguments);
   void <span title=dom-sqltransaction-executeSql>executeSql</span>(in DOMString sqlStatement, in <a href="#objectarray">ObjectArray</a> arguments, in <a href="#sqlstatementcallback">SQLStatementCallback</a> callback);
   void <span title=dom-sqltransaction-executeSql>executeSql</span>(in DOMString sqlStatement, in <a href="#objectarray">ObjectArray</a> arguments, in <a href="#sqlstatementcallback">SQLStatementCallback</a> callback, in <a href="#sqlstatementerrorcallback">SQLStatementErrorCallback</a> errorCallback);
@@ -30655,6 +30660,9 @@
      placeholder gets replaced by the <var title="">n</var>th value in the
      <var title="">arguments</var> array.)</p>
 
+    <p>If the second argument is ommitted or null, then treat the <var
+     title="">arguments</var> array as empty.</p>
+
     <p>The result is <i>the statement</i>.</p>
 
    <li>
@@ -30678,8 +30686,8 @@
 
    <li>
     <p>Queue up <i>the statement</i> in the transaction, along with the third
-     argument as the statement's result set callback and the fourth argument
-     (if any) as the error callback.
+     argument (if any) as the statement's result set callback and the fourth
+     argument (if any) as the error callback.
   </ol>
 
   <p>The user agent must act as if the database was hosted in an otherwise
@@ -30858,8 +30866,8 @@
   <p>The <dfn id=transaction0>transaction steps</dfn> are as follows. These
    steps must be run asynchronously. These steps are invoked with a
    <i>transaction callback</i>, optionally an <i>error callback</i>,
-   optionally a <i>preflight operation</i>, and optionally a <i>postflight
-   operation</i>.
+   optionally a <i>success callback</i>, optionally a <i>preflight
+   operation</i>, and optionally a <i>postflight operation</i>.
 
   <ol>
    <li>
@@ -30969,6 +30977,9 @@
      last step.
 
    <li>
+    <p>Invoke the <i>success callback</i>.
+
+   <li>
     <p>End these steps. The next step is only used when something goes wrong.
 
    <li>

Modified: source
===================================================================
--- source	2007-10-31 09:36:03 UTC (rev 1115)
+++ source	2007-11-01 00:24:39 UTC (rev 1116)
@@ -28099,10 +28099,12 @@
   increase the quota every five megabytes.</p>
 
   <pre class="idl">interface <dfn>Database</dfn> {
-  readonly attribute DOMString <span title="dom-database-version">version</span>;
-  void <span title="dom-database-changeVersion">changeVersion</span>(in DOMString oldVersion, in DOMString newVersion, in <span>SQLTransactionCallback</span> callback, in <span>SQLTransactionErrorCallback</span> errorCallback);
   void <span title="dom-database-transaction">transaction</span>(in <span>SQLTransactionCallback</span> callback);
   void <span title="dom-database-transaction">transaction</span>(in <span>SQLTransactionCallback</span> callback, in <span>SQLTransactionErrorCallback</span> errorCallback);
+  void <span title="dom-database-transaction">transaction</span>(in <span>SQLTransactionCallback</span> callback, in <span>SQLTransactionErrorCallback</span> errorCallback, in <span>VoidCallback</span> successCallback);
+
+  readonly attribute DOMString <span title="dom-database-version">version</span>;
+  void <span title="dom-database-changeVersion">changeVersion</span>(in DOMString oldVersion, in DOMString newVersion, in <span>SQLTransactionCallback</span> callback, in <span>SQLTransactionErrorCallback</span> errorCallback, in <span>VoidCallback</span> successCallback);
 };
 
 interface <dfn>SQLTransactionCallback</dfn> {
@@ -28119,7 +28121,8 @@
   immediately return and then asynchronously run the <span>transaction
   steps</span> with the <i>transaction callback</i> being the first
   argument, the <i>error callback</i> being the second argument, if
-  any, and with no <i>preflight operation</i> or <i>postflight
+  any, the <i>success callback</i> being the third argument, if any,
+  and with no <i>preflight operation</i> or <i>postflight
   operation</i>.</p>
 
   <p>The version that the database was opened with is the <dfn
@@ -28141,7 +28144,8 @@
   is invoked, it must immediately return, and then asynchronously run
   the <span>transaction steps</span> with the <i>transaction
   callback</i> being the third argument, the <i>error callback</i>
-  being the fourth argument, the <i>preflight operation</i> being the
+  being the fourth argument, the <i>success callback</i> being the
+  fifth argument, the <i>preflight operation</i> being the
   following:</p>
 
   <ol>
@@ -28180,6 +28184,7 @@
   <pre class="idl">typedef sequence<Object> <dfn>ObjectArray</dfn>;
 
 interface <dfn>SQLTransaction</dfn> {
+  void <span title="dom-sqltransaction-executeSql">executeSql</span>(in DOMString sqlStatement);
   void <span title="dom-sqltransaction-executeSql">executeSql</span>(in DOMString sqlStatement, in <span>ObjectArray</span> arguments);
   void <span title="dom-sqltransaction-executeSql">executeSql</span>(in DOMString sqlStatement, in <span>ObjectArray</span> arguments, in <span>SQLStatementCallback</span> callback);
   void <span title="dom-sqltransaction-executeSql">executeSql</span>(in DOMString sqlStatement, in <span>ObjectArray</span> arguments, in <span>SQLStatementCallback</span> callback, in <span>SQLStatementErrorCallback</span> errorCallback);
@@ -28232,6 +28237,9 @@
     replaced by the <var title="">n</var>th value in the <var
     title="">arguments</var> array.)</p>
 
+    <p>If the second argument is ommitted or null, then treat the <var
+    title="">arguments</var> array as empty.</p>
+
     <p>The result is <i>the statement</i>.</p>
 
    </li>
@@ -28253,8 +28261,8 @@
    title="dom-sqlerror-code-2">Error code 2</span>.)</p></li>
 
    <li><p>Queue up <i>the statement</i> in the transaction, along with
-   the third argument as the statement's result set callback and the
-   fourth argument (if any) as the error callback.</p></li>
+   the third argument (if any) as the statement's result set callback
+   and the fourth argument (if any) as the error callback.</p></li>
 
   </ol>
 
@@ -28434,8 +28442,8 @@
   <p>The <dfn>transaction steps</dfn> are as follows. These steps must
   be run asynchronously. These steps are invoked with a <i>transaction
   callback</i>, optionally an <i>error callback</i>, optionally a
-  <i>preflight operation</i>, and optionally a <i>postflight
-  operation</i>.</p>
+  <i>success callback</i>, optionally a <i>preflight operation</i>,
+  and optionally a <i>postflight operation</i>.</p>
 
   <ol>
 
@@ -28532,6 +28540,8 @@
    <li><p>If an error occured in the committing of the transaction,
    jump to the last step.</p></li>
 
+   <li><p>Invoke the <i>success callback</i>.</p></li>
+
    <li><p>End these steps. The next step is only used when something
    goes wrong.</p></li>
 




More information about the Commit-Watchers mailing list