version 1.4, 2009/07/16 07:27:06
|
version 1.5, 2009/08/08 00:21:09
|
Line 174
|
Line 174
|
<h1>Web Database</h1> |
<h1>Web Database</h1> |
<!--ZZZ:--> |
<!--ZZZ:--> |
<!--<h2 class="no-num no-toc">W3C Working Draft 23 April 2009</h2>--> |
<!--<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 16 July 2009</h2> |
<h2 class="no-num no-toc" id="editor-s-draft-date-1-january-1970">Editor's Draft 8 August 2009</h2> |
<!--:ZZZ--> |
<!--:ZZZ--> |
<dl><!-- ZZZ: update the month/day (twice), (un)comment out |
<dl><!-- ZZZ: update the month/day (twice), (un)comment out |
<dt>This Version:</dt> |
<dt>This Version:</dt> |
Line 241
|
Line 241
|
specification's progress along the W3C Recommendation track. |
specification's progress along the W3C Recommendation track. |
<!--ZZZ:--> |
<!--ZZZ:--> |
<!--This specification is the 23 April 2009 Working Draft.--> |
<!--This specification is the 23 April 2009 Working Draft.--> |
This specification is the 16 July 2009 Editor's Draft. |
This specification is the 8 August 2009 Editor's Draft. |
<!--:ZZZ--> |
<!--: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 |
</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 |
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 |
Line 356 have a variable and unknowable number of
|
Line 356 have a variable and unknowable number of
|
allow authors to manage schema changes incrementally and |
allow authors to manage schema changes incrementally and |
non-destructively, and without running the risk of old code (e.g. in |
non-destructively, and without running the risk of old code (e.g. in |
another browser window) trying to write to a database with incorrect |
another browser window) trying to write to a database with incorrect |
assumptions.<pre class="idl">[Supplemental] interface <span>Window</span> { |
assumptions.<pre class="idl">[Supplemental, NoInterfaceObject] |
|
interface <span>WindowDatabase</span> { |
<a href="#database">Database</a> <a href="#dom-opendatabase" title="dom-opendatabase">openDatabase</a>(in DOMString name, in DOMString version, in DOMString displayName, in unsigned long estimatedSize); |
<a href="#database">Database</a> <a href="#dom-opendatabase" title="dom-opendatabase">openDatabase</a>(in DOMString name, in DOMString version, in DOMString displayName, in unsigned long estimatedSize); |
}; |
}; |
|
<span>Window</span> implements <span>WindowDatabase</span>; |
|
|
[Supplemental] interface <span>WorkerUtils</span> { |
[Supplemental, NoInterfaceObject] |
|
interface <span>WorkerUtilsDatabase</span> { |
<a href="#database">Database</a> <a href="#dom-opendatabase" title="dom-opendatabase">openDatabase</a>(in DOMString name, in DOMString version, in DOMString displayName, in unsigned long estimatedSize); |
<a href="#database">Database</a> <a href="#dom-opendatabase" title="dom-opendatabase">openDatabase</a>(in DOMString name, in DOMString version, in DOMString displayName, in unsigned long estimatedSize); |
<a href="#databasesync">DatabaseSync</a> <a href="#dom-opendatabase-sync" title="dom-opendatabase-sync">openDatabaseSync</a>(in DOMString name, in DOMString version, in DOMString displayName, in unsigned long estimatedSize); |
<a href="#databasesync">DatabaseSync</a> <a href="#dom-opendatabase-sync" title="dom-opendatabase-sync">openDatabaseSync</a>(in DOMString name, in DOMString version, in DOMString displayName, in unsigned long estimatedSize); |
};</pre><p>The <dfn id="dom-opendatabase" title="dom-opendatabase"><code>openDatabase()</code></dfn> method on |
}; |
|
<span>WorkerUtils</span> implements <span>WorkerUtilsDatabase</span>;</pre><p>The <dfn id="dom-opendatabase" title="dom-opendatabase"><code>openDatabase()</code></dfn> method on |
the <code>Window</code> and <code>WorkerUtils</code> interfaces must |
the <code>Window</code> and <code>WorkerUtils</code> interfaces must |
return a newly constructed <code><a href="#database">Database</a></code> object that |
return a newly constructed <code><a href="#database">Database</a></code> object that |
represents the database requested.<p>The <dfn id="dom-opendatabase-sync" title="dom-opendatabase-sync"><code>openDatabaseSync()</code></dfn> |
represents the database requested.<p>The <dfn id="dom-opendatabase-sync" title="dom-opendatabase-sync"><code>openDatabaseSync()</code></dfn> |
Line 484 have a variable and unknowable number of
|
Line 488 have a variable and unknowable number of
|
example, attempts to read from or write to the file system will |
example, attempts to read from or write to the file system will |
fail.<p class="note">A future version of this specification will probably |
fail.<p class="note">A future version of this specification will probably |
define the exact SQL subset required in more detail.<h3 id="asynchronous-database-api"><span class="secno">4.3 </span>Asynchronous database API</h3><pre class="idl">interface <dfn id="database">Database</dfn> { |
define the exact SQL subset required in more detail.<h3 id="asynchronous-database-api"><span class="secno">4.3 </span>Asynchronous database API</h3><pre class="idl">interface <dfn id="database">Database</dfn> { |
void <a href="#dom-database-transaction" title="dom-database-transaction">transaction</a>(in <a href="#sqltransactioncallback">SQLTransactionCallback</a> callback, [Optional] in <a href="#sqltransactionerrorcallback">SQLTransactionErrorCallback</a> errorCallback, [Optional] in <a href="#sqlvoidcallback">SQLVoidCallback</a> successCallback); |
void <a href="#dom-database-transaction" title="dom-database-transaction">transaction</a>(in <a href="#sqltransactioncallback">SQLTransactionCallback</a> callback, optional in <a href="#sqltransactionerrorcallback">SQLTransactionErrorCallback</a> errorCallback, optional in <a href="#sqlvoidcallback">SQLVoidCallback</a> successCallback); |
void <a href="#dom-database-readtransaction" title="dom-database-readTransaction">readTransaction</a>(in <a href="#sqltransactioncallback">SQLTransactionCallback</a> callback, [Optional] in <a href="#sqltransactionerrorcallback">SQLTransactionErrorCallback</a> errorCallback, [Optional] in <a href="#sqlvoidcallback">SQLVoidCallback</a> successCallback); |
void <a href="#dom-database-readtransaction" title="dom-database-readTransaction">readTransaction</a>(in <a href="#sqltransactioncallback">SQLTransactionCallback</a> callback, optional in <a href="#sqltransactionerrorcallback">SQLTransactionErrorCallback</a> errorCallback, optional in <a href="#sqlvoidcallback">SQLVoidCallback</a> successCallback); |
|
|
readonly attribute DOMString <a href="#dom-database-version" title="dom-database-version">version</a>; |
readonly attribute DOMString <a href="#dom-database-version" title="dom-database-version">version</a>; |
void <a href="#dom-database-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="#sqlvoidcallback">SQLVoidCallback</a> successCallback); |
void <a href="#dom-database-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="#sqlvoidcallback">SQLVoidCallback</a> successCallback); |
Line 544 interface <dfn id="sqltransactionerrorca
|
Line 548 interface <dfn id="sqltransactionerrorca
|
objects.<pre class="idl">typedef sequence<any> <dfn id="objectarray">ObjectArray</dfn>; |
objects.<pre class="idl">typedef sequence<any> <dfn id="objectarray">ObjectArray</dfn>; |
|
|
interface <dfn id="sqltransaction">SQLTransaction</dfn> { |
interface <dfn id="sqltransaction">SQLTransaction</dfn> { |
void <a href="#dom-sqltransaction-executesql" title="dom-sqltransaction-executeSql">executeSql</a>(in DOMString sqlStatement, [Optional] in <a href="#objectarray">ObjectArray</a> arguments, [Optional] in <a href="#sqlstatementcallback">SQLStatementCallback</a> callback, [Optional] in <a href="#sqlstatementerrorcallback">SQLStatementErrorCallback</a> errorCallback); |
void <a href="#dom-sqltransaction-executesql" title="dom-sqltransaction-executeSql">executeSql</a>(in DOMString sqlStatement, optional in <a href="#objectarray">ObjectArray</a> arguments, optional in <a href="#sqlstatementcallback">SQLStatementCallback</a> callback, optional in <a href="#sqlstatementerrorcallback">SQLStatementErrorCallback</a> errorCallback); |
}; |
}; |
|
|
[Callback=FunctionOnly, NoInterfaceObject] |
[Callback=FunctionOnly, NoInterfaceObject] |
Line 760 interface <dfn id="sqlstatementerrorcall
|
Line 764 interface <dfn id="sqlstatementerrorcall
|
methods return <code><a href="#sqltransactionsync">SQLTransactionSync</a></code> objects.<pre class="idl">// typedef sequence<any> <a href="#objectarray">ObjectArray</a>; |
methods return <code><a href="#sqltransactionsync">SQLTransactionSync</a></code> objects.<pre class="idl">// typedef sequence<any> <a href="#objectarray">ObjectArray</a>; |
|
|
interface <dfn id="sqltransactionsync">SQLTransactionSync</dfn> { |
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); |
<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-commit" title="dom-sqltransaction-sync-commit">commit</a>(); |
void <a href="#dom-sqltransaction-sync-rollback" title="dom-sqltransaction-sync-rollback">rollback</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> |
};</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> |
Line 838 interface <dfn id="sqltransactionsync">S
|
Line 842 interface <dfn id="sqltransactionsync">S
|
(its <code title="dom-SQLResultSetRowList-length"><a href="#dom-sqlresultsetrowlist-length">length</a></code> will |
(its <code title="dom-SQLResultSetRowList-length"><a href="#dom-sqlresultsetrowlist-length">length</a></code> will |
be zero).<pre class="idl">interface <dfn id="sqlresultsetrowlist">SQLResultSetRowList</dfn> { |
be zero).<pre class="idl">interface <dfn id="sqlresultsetrowlist">SQLResultSetRowList</dfn> { |
readonly attribute unsigned long <a href="#dom-sqlresultsetrowlist-length" title="dom-SQLResultSetRowList-length">length</a>; |
readonly attribute unsigned long <a href="#dom-sqlresultsetrowlist-length" title="dom-SQLResultSetRowList-length">length</a>; |
[IndexGetter] <span>any</span> <a href="#dom-sqlresultsetrowlist-item" title="dom-SQLResultSetRowList-item">item</a>(in unsigned long index); |
getter <span>any</span> <a href="#dom-sqlresultsetrowlist-item" title="dom-SQLResultSetRowList-item">item</a>(in unsigned long index); |
};</pre><p class="note">Implementors are encouraged to implement |
};</pre><p class="note">Implementors are encouraged to implement |
<code><a href="#sqlresultsetrowlist">SQLResultSetRowList</a></code> objects lazily, or at least |
<code><a href="#sqlresultsetrowlist">SQLResultSetRowList</a></code> objects lazily, or at least |
asynchronously, for better performance.<p><code><a href="#sqlresultsetrowlist">SQLResultSetRowList</a></code> objects have a <dfn id="dom-sqlresultsetrowlist-length" title="dom-SQLResultSetRowList-length"><code>length</code></dfn> |
asynchronously, for better performance.<p><code><a href="#sqlresultsetrowlist">SQLResultSetRowList</a></code> objects have a <dfn id="dom-sqlresultsetrowlist-length" title="dom-SQLResultSetRowList-length"><code>length</code></dfn> |