Define transaction()'s storeNames parameter using a WebIDL union. Bug 16653
authorJoshua bell <jsbell@google.com>
Fri, 01 Mar 2013 11:04:15 -0800
changeset 401b6d2f7b5a5a0
parent 400 f74a5b0a703c
child 402 ee33a01d9d7f
Define transaction()'s storeNames parameter using a WebIDL union. Bug 16653
Overview.html
Speclet_021_IDB_API_Algorithms.html
Speclet_022_IDB_API_Synchronous_APIs.html
Speclet_023_IDB_API_Asynchronous_APIs.html
     1.1 --- a/Overview.html	Fri Mar 01 10:41:15 2013 -0800
     1.2 +++ b/Overview.html	Fri Mar 01 11:04:15 2013 -0800
     1.3 @@ -1900,9 +1900,8 @@
     1.4                  exception MUST be thrown.
     1.5                </p>
     1.6                <dl class="parameters">
     1.7 -                <dt>any storeNames</dt>
     1.8 -                <dd>The names of <a title="object store">object stores</a> and
     1.9 -                <a title="index">indexes</a> in the <a>scope</a> of the new
    1.10 +                <dt>(DOMString or sequence&lt;DOMString&gt;) storeNames</dt>
    1.11 +                <dd>The names of <a title="object store">object stores</a> in the <a>scope</a> of the new
    1.12                  <a>transaction</a></dd>
    1.13                  <dt>optional IDBTransactionMode mode = "readonly"</dt>
    1.14                  <dd> The <a>mode</a> for isolating access to data inside the given
    1.15 @@ -3149,9 +3148,8 @@
    1.16                  <a>IDBVersionChangeCallback</a> of a <code>open</code> method.
    1.17                </p>
    1.18                <dl class="parameters">
    1.19 -                <dt>any storeNames</dt>
    1.20 -                <dd>The names of <a title="object store">object stores</a> and
    1.21 -                  <a title="index">indexes</a> in the <a>scope</a> of the new
    1.22 +                <dt>(DOMString or sequence&lt;DOMString&gt;) storeNames</dt>
    1.23 +                <dd>The names of <a title="object store">object stores</a> in the <a>scope</a> of the new
    1.24                    <a>transaction</a></dd>
    1.25                  <dt>IDBTransactionCallback callback</dt>
    1.26                  <dd>A callback which will be called with the newly created transaction. When the callback returns,
    1.27 @@ -4384,10 +4382,11 @@
    1.28                <a title="transaction-callback">transaction callback</a>), throw a <code>DOMException</code> of type <a>InvalidStateError</a>.
    1.29              </li>
    1.30              <li>
    1.31 -              If <var>storeNames</var> is of type <code>DOMStringList</code> or <code>Array</code> leave it as is. Otherwise,
    1.32 -              interpret it as an <code>Array</code> with one value, and that value is the <a>stringified</a> version of
    1.33 -              <var>storeNames</var>. If any of the strings in <var>storeNames</var> identifies an <a>object store</a> which doesn't
    1.34 -              exist, throw a <code>DOMException</code> of type <a>NotFoundError</a>. If <var>storeNames</var> is an empty list
    1.35 +              If <var>storeNames</var> is of type <code>sequence&lt;DOMString&gt;</code> then let
    1.36 +              <var>scope</var> be the set of unique strings in the sequence. Otherwise, <var>storeNames</var>
    1.37 +              must be a <code>DOMString</code>; let <var>scope</var> be a set containing one string equal to <var>storeNames</var>.
    1.38 +              If any of the strings in <var>scope</var> identifies an <a>object store</a> which doesn't
    1.39 +              exist, throw a <code>DOMException</code> of type <a>NotFoundError</a>. If <var>scope</var> is an empty set
    1.40                throw a <code>DOMException</code> of type <a>InvalidAccessError</a>.
    1.41              </li>
    1.42              <li>
    1.43 @@ -4395,8 +4394,8 @@
    1.44              </li>
    1.45              <li>
    1.46                <a title="transaction create">Create</a> a <a>transaction</a> using <var>connection</var> as
    1.47 -              <a>connection</a>, <var>mode</var> as <a>mode</a>, and the <a>object store</a>s identified in
    1.48 -              <var>storeNames</var> as <a>scope</a>.
    1.49 +              <a>connection</a>, <var>mode</var> as <a>mode</a>, and the <a title="object store">object stores</a> identified in
    1.50 +              <var>scope</var> as <a>scope</a>.
    1.51              </li>
    1.52              <li>
    1.53                If these steps are running asynchronously, return the created <a>transaction</a> and queue up the remaining steps.
     2.1 --- a/Speclet_021_IDB_API_Algorithms.html	Fri Mar 01 10:41:15 2013 -0800
     2.2 +++ b/Speclet_021_IDB_API_Algorithms.html	Fri Mar 01 11:04:15 2013 -0800
     2.3 @@ -223,10 +223,11 @@
     2.4                <a title="transaction-callback">transaction callback</a>), throw a <code>DOMException</code> of type <a>InvalidStateError</a>.
     2.5              </li>
     2.6              <li>
     2.7 -              If <var>storeNames</var> is of type <code>DOMStringList</code> or <code>Array</code> leave it as is. Otherwise,
     2.8 -              interpret it as an <code>Array</code> with one value, and that value is the <a>stringified</a> version of
     2.9 -              <var>storeNames</var>. If any of the strings in <var>storeNames</var> identifies an <a>object store</a> which doesn't
    2.10 -              exist, throw a <code>DOMException</code> of type <a>NotFoundError</a>. If <var>storeNames</var> is an empty list
    2.11 +              If <var>storeNames</var> is of type <code>sequence&lt;DOMString&gt;</code> then let
    2.12 +              <var>scope</var> be the set of unique strings in the sequence. Otherwise, <var>storeNames</var>
    2.13 +              must be a <code>DOMString</code>; let <var>scope</var> be a set containing one string equal to <var>storeNames</var>.
    2.14 +              If any of the strings in <var>scope</var> identifies an <a>object store</a> which doesn't
    2.15 +              exist, throw a <code>DOMException</code> of type <a>NotFoundError</a>. If <var>scope</var> is an empty set
    2.16                throw a <code>DOMException</code> of type <a>InvalidAccessError</a>.
    2.17              </li>
    2.18              <li>
    2.19 @@ -234,8 +235,8 @@
    2.20              </li>
    2.21              <li>
    2.22                <a title="transaction create">Create</a> a <a>transaction</a> using <var>connection</var> as
    2.23 -              <a>connection</a>, <var>mode</var> as <a>mode</a>, and the <a>object store</a>s identified in
    2.24 -              <var>storeNames</var> as <a>scope</a>.
    2.25 +              <a>connection</a>, <var>mode</var> as <a>mode</a>, and the <a title="object store">object stores</a> identified in
    2.26 +              <var>scope</var> as <a>scope</a>.
    2.27              </li>
    2.28              <li>
    2.29                If these steps are running asynchronously, return the created <a>transaction</a> and queue up the remaining steps.
     3.1 --- a/Speclet_022_IDB_API_Synchronous_APIs.html	Fri Mar 01 10:41:15 2013 -0800
     3.2 +++ b/Speclet_022_IDB_API_Synchronous_APIs.html	Fri Mar 01 11:04:15 2013 -0800
     3.3 @@ -396,9 +396,8 @@
     3.4                  <a>IDBVersionChangeCallback</a> of a <code>open</code> method.
     3.5                </p>
     3.6                <dl class="parameters">
     3.7 -                <dt>any storeNames</dt>
     3.8 -                <dd>The names of <a title="object store">object stores</a> and
     3.9 -                  <a title="index">indexes</a> in the <a>scope</a> of the new
    3.10 +                <dt>(DOMString or sequence&lt;DOMString&gt;) storeNames</dt>
    3.11 +                <dd>The names of <a title="object store">object stores</a> in the <a>scope</a> of the new
    3.12                    <a>transaction</a></dd>
    3.13                  <dt>IDBTransactionCallback callback</dt>
    3.14                  <dd>A callback which will be called with the newly created transaction. When the callback returns,
     4.1 --- a/Speclet_023_IDB_API_Asynchronous_APIs.html	Fri Mar 01 10:41:15 2013 -0800
     4.2 +++ b/Speclet_023_IDB_API_Asynchronous_APIs.html	Fri Mar 01 11:04:15 2013 -0800
     4.3 @@ -548,9 +548,8 @@
     4.4                  exception MUST be thrown.
     4.5                </p>
     4.6                <dl class="parameters">
     4.7 -                <dt>any storeNames</dt>
     4.8 -                <dd>The names of <a title="object store">object stores</a> and
     4.9 -                <a title="index">indexes</a> in the <a>scope</a> of the new
    4.10 +                <dt>(DOMString or sequence&lt;DOMString&gt;) storeNames</dt>
    4.11 +                <dd>The names of <a title="object store">object stores</a> in the <a>scope</a> of the new
    4.12                  <a>transaction</a></dd>
    4.13                  <dt>optional IDBTransactionMode mode = "readonly"</dt>
    4.14                  <dd> The <a>mode</a> for isolating access to data inside the given