Bug 11976: Make it possible to specify a key even when key generators are used.
authorJonas Sicking <jonas@sicking.cc>
Mon, 07 Mar 2011 19:10:43 -0800
changeset 128bf74f973122d
parent 127 feeee594efa1
child 129 2f719e76cb34
Bug 11976: Make it possible to specify a key even when key generators are used.
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	Mon Mar 07 17:19:06 2011 -0800
     1.2 +++ b/Overview.html	Mon Mar 07 19:10:43 2011 -0800
     1.3 @@ -989,6 +989,8 @@
     1.4                The message should be localized to the user's language.
     1.5              </dd>
     1.6            </dl>
     1.7 +          <p class="issue>These codes are in flux and may change entirely as exception/error handling may be changing in
     1.8 +          the WebIDL spec.</p>
     1.9          </section>
    1.10        </section>  
    1.11        <section id="options-object-concept" class="section">
    1.12 @@ -1416,7 +1418,7 @@
    1.13                </p>
    1.14                <ul>
    1.15                  <li>
    1.16 -                  The object store uses <a>in-line keys</a> or has a <a>key generator</a> and
    1.17 +                  The object store uses <a>in-line keys</a> and
    1.18                    the <var>key</var> parameter was provided.
    1.19                  </li>
    1.20                  <li>
    1.21 @@ -1424,10 +1426,15 @@
    1.22                    and the <var>key</var> parameter was not provided.
    1.23                  </li>
    1.24                  <li>
    1.25 +                  The object store uses <a>in-line keys</a>
    1.26 +                  and the result of <a title="evaluate key path">evaluating</a> the 
    1.27 +                  <a title="object store key path">object store's key path</a> yields a value and
    1.28 +                  that value is not a <a>valid key</a>.
    1.29 +                </li>
    1.30 +                <li>
    1.31                    The object store uses <a>in-line keys</a> but no <a>key generator</a>
    1.32 -                  and the result of <a title="evaluate key path">evaluating</a> the 
    1.33 -                  <a title="object store key path">object store's key path</a> does not yield a
    1.34 -                  <a>valid key</a>.
    1.35 +                  and the result of <a title="evaluate key path">evaluating</a> the
    1.36 +                  <a title="object store key path">object store's key path</a> does not yield a value.
    1.37                  </li>
    1.38                  <li>
    1.39                    The <var>key</var> parameter was provided but does not contain a <a>valid key</a>.
    1.40 @@ -1478,7 +1485,7 @@
    1.41                </p>
    1.42                <ul>
    1.43                  <li>
    1.44 -                  The object store uses <a>in-line keys</a> or has a <a>key generator</a> and
    1.45 +                  The object store uses <a>in-line keys</a> and
    1.46                    the <var>key</var> parameter was provided.
    1.47                  </li>
    1.48                  <li>
    1.49 @@ -1486,10 +1493,15 @@
    1.50                    and the <var>key</var> parameter was not provided.
    1.51                  </li>
    1.52                  <li>
    1.53 +                  The object store uses <a>in-line keys</a>
    1.54 +                  and the result of <a title="evaluate key path">evaluating</a> the 
    1.55 +                  <a title="object store key path">object store's key path</a> yields a value and
    1.56 +                  that value is not a <a>valid key</a>.
    1.57 +                </li>
    1.58 +                <li>
    1.59                    The object store uses <a>in-line keys</a> but no <a>key generator</a>
    1.60 -                  and the result of <a title="evaluate key path">evaluating</a> the 
    1.61 -                  <a title="object store key path">object store's key path</a> does not yield a
    1.62 -                  <a>valid key</a>.
    1.63 +                  and the result of <a title="evaluate key path">evaluating</a> the
    1.64 +                  <a title="object store key path">object store's key path</a> does not yield a value.
    1.65                  </li>
    1.66                  <li>
    1.67                    The <var>key parameter was provided but does not contain a <a>valid key</a>.
    1.68 @@ -2460,7 +2472,7 @@
    1.69                </p>
    1.70                <ul>
    1.71                  <li>
    1.72 -                  The object store uses <a>in-line keys</a> or has a <a>key generator</a> and
    1.73 +                  The object store uses <a>in-line keys</a> and
    1.74                    the <var>key</var> parameter was provided.
    1.75                  </li>
    1.76                  <li>
    1.77 @@ -2468,10 +2480,15 @@
    1.78                    and the <var>key</var> parameter was not provided.
    1.79                  </li>
    1.80                  <li>
    1.81 +                  The object store uses <a>in-line keys</a>
    1.82 +                  and the result of <a title="evaluate key path">evaluating</a> the 
    1.83 +                  <a title="object store key path">object store's key path</a> yields a value and
    1.84 +                  that value is not a <a>valid key</a>.
    1.85 +                </li>
    1.86 +                <li>
    1.87                    The object store uses <a>in-line keys</a> but no <a>key generator</a>
    1.88 -                  and the result of <a title="evaluate key path">evaluating</a> the 
    1.89 -                  <a title="object store key path">object store's key path</a> does not yield a
    1.90 -                  <a>valid key</a>.
    1.91 +                  and the result of <a title="evaluate key path">evaluating</a> the
    1.92 +                  <a title="object store key path">object store's key path</a> does not yield a value.
    1.93                  </li>
    1.94                  <li>
    1.95                    The <var>key</var> parameter was provided but does not contain a <a>valid key</a>.
    1.96 @@ -2526,7 +2543,7 @@
    1.97                </p>
    1.98                <ul>
    1.99                  <li>
   1.100 -                  The object store uses <a>in-line keys</a> or has a <a>key generator</a> and
   1.101 +                  The object store uses <a>in-line keys</a> and
   1.102                    the <var>key</var> parameter was provided.
   1.103                  </li>
   1.104                  <li>
   1.105 @@ -2534,10 +2551,15 @@
   1.106                    and the <var>key</var> parameter was not provided.
   1.107                  </li>
   1.108                  <li>
   1.109 +                  The object store uses <a>in-line keys</a>
   1.110 +                  and the result of <a title="evaluate key path">evaluating</a> the 
   1.111 +                  <a title="object store key path">object store's key path</a> yields a value and
   1.112 +                  that value is not a <a>valid key</a>.
   1.113 +                </li>
   1.114 +                <li>
   1.115                    The object store uses <a>in-line keys</a> but no <a>key generator</a>
   1.116 -                  and the result of <a title="evaluate key path">evaluating</a> the 
   1.117 -                  <a title="object store key path">object store's key path</a> does not yield a
   1.118 -                  <a>valid key</a>.
   1.119 +                  and the result of <a title="evaluate key path">evaluating</a> the
   1.120 +                  <a title="object store key path">object store's key path</a> does not yield a value.
   1.121                  </li>
   1.122                  <li>
   1.123                    The <var>key parameter was provided but does not contain a <a>valid key</a>.
   1.124 @@ -3746,15 +3768,22 @@
   1.125            </p>
   1.126            <ol>
   1.127              <li>
   1.128 -              If <var>store</var> uses a <a>key generator</a> set and <var>key</var> is undefined, set
   1.129 +              If <var>store</var> does use <a>in-line keys</a> and <a title="evaluate key path">evaluting</a>
   1.130 +              <a title="object store key path"><var>store</var>'s key path</a> on <var>value</var> does yield
   1.131 +              a value, then set <var>key</var> to that result.
   1.132 +            </li>
   1.133 +            <li>
   1.134 +              If <var>store</var> uses a <a>key generator</a> and <var>key</var> is undefined, set
   1.135                <var>key</var> to the next generated key. If <var>store</var> also uses <a>in-line keys</a>,
   1.136                then set the property in <var>value</var> pointed to by <var>store</var>'s
   1.137                <a title="object store key path">key path</a> to the new value for <var>key</var>
   1.138              </li>
   1.139              <li>
   1.140 -              If <var>store</var> does not use a <a>key generator</a> but does use <a>in-line keys</a>, then set
   1.141 -              <var>key</var> to the the result of <a title="evaluate key path">evaluting</a>
   1.142 -              <a title="object store key path"><var>store</var>'s key path</a> on <var>value</var>.
   1.143 +              If <var>store</var> uses a <a>key generator</a>, this <a>key generator</a> was not used to generate a value
   1.144 +              for <var>key</var> in the previous step, <var>key</var> is defined to a <code>long</code>
   1.145 +              or a <code>float</code> and this number is larger than, or equal to, the next key that <var>store</var>'s
   1.146 +              <a>key generator</a> would generate, change <var>store</var>'s <a>key generator</a> such that the next
   1.147 +              key it generates is the lowest integer larger than <var>key</var>.
   1.148              </li>
   1.149              <li>
   1.150                If the no-overwrite flag was passed to these steps and is set, and 
     2.1 --- a/Speclet_021_IDB_API_Algorithms.html	Mon Mar 07 17:19:06 2011 -0800
     2.2 +++ b/Speclet_021_IDB_API_Algorithms.html	Mon Mar 07 19:10:43 2011 -0800
     2.3 @@ -596,15 +596,22 @@
     2.4            </p>
     2.5            <ol>
     2.6              <li>
     2.7 -              If <var>store</var> uses a <a>key generator</a> set and <var>key</var> is undefined, set
     2.8 +              If <var>store</var> does use <a>in-line keys</a> and <a title="evaluate key path">evaluting</a>
     2.9 +              <a title="object store key path"><var>store</var>'s key path</a> on <var>value</var> does yield
    2.10 +              a value, then set <var>key</var> to that result.
    2.11 +            </li>
    2.12 +            <li>
    2.13 +              If <var>store</var> uses a <a>key generator</a> and <var>key</var> is undefined, set
    2.14                <var>key</var> to the next generated key. If <var>store</var> also uses <a>in-line keys</a>,
    2.15                then set the property in <var>value</var> pointed to by <var>store</var>'s
    2.16 -              <a title="object store key path">key path</a> to the new value for <var>key</var>
    2.17 +              <a title="object store key path">key path</a> to the new value for <var>key</var>.
    2.18              </li>
    2.19              <li>
    2.20 -              If <var>store</var> does not use a <a>key generator</a> but does use <a>in-line keys</a>, then set
    2.21 -              <var>key</var> to the the result of <a title="evaluate key path">evaluting</a>
    2.22 -              <a title="object store key path"><var>store</var>'s key path</a> on <var>value</var>.
    2.23 +              If <var>store</var> uses a <a>key generator</a>, this <a>key generator</a> was not used to generate a value
    2.24 +              for <var>key</var> in the previous step, <var>key</var> is defined to a <code>long</code>
    2.25 +              or a <code>float</code> and this number is larger than, or equal to, the next key that <var>store</var>'s
    2.26 +              <a>key generator</a> would generate, change <var>store</var>'s <a>key generator</a> such that the next
    2.27 +              key it generates is the lowest integer larger than <var>key</var>.
    2.28              </li>
    2.29              <li>
    2.30                If the no-overwrite flag was passed to these steps and is set, and 
     3.1 --- a/Speclet_022_IDB_API_Synchronous_APIs.html	Mon Mar 07 17:19:06 2011 -0800
     3.2 +++ b/Speclet_022_IDB_API_Synchronous_APIs.html	Mon Mar 07 19:10:43 2011 -0800
     3.3 @@ -453,7 +453,7 @@
     3.4                </p>
     3.5                <ul>
     3.6                  <li>
     3.7 -                  The object store uses <a>in-line keys</a> or has a <a>key generator</a> and
     3.8 +                  The object store uses <a>in-line keys</a> and
     3.9                    the <var>key</var> parameter was provided.
    3.10                  </li>
    3.11                  <li>
    3.12 @@ -461,10 +461,15 @@
    3.13                    and the <var>key</var> parameter was not provided.
    3.14                  </li>
    3.15                  <li>
    3.16 +                  The object store uses <a>in-line keys</a>
    3.17 +                  and the result of <a title="evaluate key path">evaluating</a> the 
    3.18 +                  <a title="object store key path">object store's key path</a> yields a value and
    3.19 +                  that value is not a <a>valid key</a>.
    3.20 +                </li>
    3.21 +                <li>
    3.22                    The object store uses <a>in-line keys</a> but no <a>key generator</a>
    3.23 -                  and the result of <a title="evaluate key path">evaluating</a> the 
    3.24 -                  <a title="object store key path">object store's key path</a> does not yield a
    3.25 -                  <a>valid key</a>.
    3.26 +                  and the result of <a title="evaluate key path">evaluating</a> the
    3.27 +                  <a title="object store key path">object store's key path</a> does not yield a value.
    3.28                  </li>
    3.29                  <li>
    3.30                    The <var>key</var> parameter was provided but does not contain a <a>valid key</a>.
    3.31 @@ -519,7 +524,7 @@
    3.32                </p>
    3.33                <ul>
    3.34                  <li>
    3.35 -                  The object store uses <a>in-line keys</a> or has a <a>key generator</a> and
    3.36 +                  The object store uses <a>in-line keys</a> and
    3.37                    the <var>key</var> parameter was provided.
    3.38                  </li>
    3.39                  <li>
    3.40 @@ -527,10 +532,15 @@
    3.41                    and the <var>key</var> parameter was not provided.
    3.42                  </li>
    3.43                  <li>
    3.44 +                  The object store uses <a>in-line keys</a>
    3.45 +                  and the result of <a title="evaluate key path">evaluating</a> the 
    3.46 +                  <a title="object store key path">object store's key path</a> yields a value and
    3.47 +                  that value is not a <a>valid key</a>.
    3.48 +                </li>
    3.49 +                <li>
    3.50                    The object store uses <a>in-line keys</a> but no <a>key generator</a>
    3.51 -                  and the result of <a title="evaluate key path">evaluating</a> the 
    3.52 -                  <a title="object store key path">object store's key path</a> does not yield a
    3.53 -                  <a>valid key</a>.
    3.54 +                  and the result of <a title="evaluate key path">evaluating</a> the
    3.55 +                  <a title="object store key path">object store's key path</a> does not yield a value.
    3.56                  </li>
    3.57                  <li>
    3.58                    The <var>key parameter was provided but does not contain a <a>valid key</a>.
     4.1 --- a/Speclet_023_IDB_API_Asynchronous_APIs.html	Mon Mar 07 17:19:06 2011 -0800
     4.2 +++ b/Speclet_023_IDB_API_Asynchronous_APIs.html	Mon Mar 07 19:10:43 2011 -0800
     4.3 @@ -539,7 +539,7 @@
     4.4                </p>
     4.5                <ul>
     4.6                  <li>
     4.7 -                  The object store uses <a>in-line keys</a> or has a <a>key generator</a> and
     4.8 +                  The object store uses <a>in-line keys</a> and
     4.9                    the <var>key</var> parameter was provided.
    4.10                  </li>
    4.11                  <li>
    4.12 @@ -547,10 +547,15 @@
    4.13                    and the <var>key</var> parameter was not provided.
    4.14                  </li>
    4.15                  <li>
    4.16 +                  The object store uses <a>in-line keys</a>
    4.17 +                  and the result of <a title="evaluate key path">evaluating</a> the 
    4.18 +                  <a title="object store key path">object store's key path</a> yields a value and
    4.19 +                  that value is not a <a>valid key</a>.
    4.20 +                </li>
    4.21 +                <li>
    4.22                    The object store uses <a>in-line keys</a> but no <a>key generator</a>
    4.23 -                  and the result of <a title="evaluate key path">evaluating</a> the 
    4.24 -                  <a title="object store key path">object store's key path</a> does not yield a
    4.25 -                  <a>valid key</a>.
    4.26 +                  and the result of <a title="evaluate key path">evaluating</a> the
    4.27 +                  <a title="object store key path">object store's key path</a> does not yield a value.
    4.28                  </li>
    4.29                  <li>
    4.30                    The <var>key</var> parameter was provided but does not contain a <a>valid key</a>.
    4.31 @@ -601,7 +606,7 @@
    4.32                </p>
    4.33                <ul>
    4.34                  <li>
    4.35 -                  The object store uses <a>in-line keys</a> or has a <a>key generator</a> and
    4.36 +                  The object store uses <a>in-line keys</a> and
    4.37                    the <var>key</var> parameter was provided.
    4.38                  </li>
    4.39                  <li>
    4.40 @@ -609,10 +614,15 @@
    4.41                    and the <var>key</var> parameter was not provided.
    4.42                  </li>
    4.43                  <li>
    4.44 +                  The object store uses <a>in-line keys</a>
    4.45 +                  and the result of <a title="evaluate key path">evaluating</a> the 
    4.46 +                  <a title="object store key path">object store's key path</a> yields a value and
    4.47 +                  that value is not a <a>valid key</a>.
    4.48 +                </li>
    4.49 +                <li>
    4.50                    The object store uses <a>in-line keys</a> but no <a>key generator</a>
    4.51 -                  and the result of <a title="evaluate key path">evaluating</a> the 
    4.52 -                  <a title="object store key path">object store's key path</a> does not yield a
    4.53 -                  <a>valid key</a>.
    4.54 +                  and the result of <a title="evaluate key path">evaluating</a> the
    4.55 +                  <a title="object store key path">object store's key path</a> does not yield a value.
    4.56                  </li>
    4.57                  <li>
    4.58                    The <var>key parameter was provided but does not contain a <a>valid key</a>.