<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>21559</bug_id>
          
          <creation_ts>2013-04-03 00:00:13 +0000</creation_ts>
          <short_desc>[IndexedDB] Term &quot;primary key&quot; needs defining</short_desc>
          <delta_ts>2013-04-03 17:45:59 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>Indexed Database API</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joshua Bell">jsbell</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>mike</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>85465</commentid>
    <comment_count>0</comment_count>
    <who name="Joshua Bell">jsbell</who>
    <bug_when>2013-04-03 00:00:13 +0000</bug_when>
    <thetext>The term &quot;primary key&quot; is used in the spec in a couple of places:

(1)  3.2.6 Index
&quot;getKey - Gets the primary key of the record from the referenced object store entry.&quot;

In this case, the word &quot;primary&quot; can simply be dropped; it&apos;s already referring to the referenced object store, and the algorithm clearly defines what should happen.

(2) 3.5.7 Cursor Iteration Operation
&quot;If /found record/ is not defined, set /cursor/&apos;s /key/ and primary key to |undefined|.&quot;

This blurs the line between the IDBCursor (the IDL interface) and the abstract cursor mechanism defined in 3.1.10. IDBCursor has |key|, |primaryKey| and (for IDBCursorWithValue) |value| attributes. A cursor has /position/, /key/ and /value/ properties, and defines /effective key/ (if the source is an index).

The algorithm should not refer to the IDL attributes, but the properties of the cursor mechanism. 

Given that:

&quot;IDBCursor.primaryKey Returns the cursor&apos;s current effective key.&quot;
and:
&quot;If the source of a cursor is an index, the effective object store of the cursor is that index&apos;s referenced object store and the effective key is the cursor&apos;s object store position.&quot;

.. then it should be sufficient to state:

&quot;If /found record/ is not defined, set /cursor/&apos;s /key/ to undefined. If /source/ is an index, set /cursor/&apos;s /object store position/ to undefined.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85514</commentid>
    <comment_count>1</comment_count>
    <who name="Joshua Bell">jsbell</who>
    <bug_when>2013-04-03 17:45:59 +0000</bug_when>
    <thetext>Made those changes in https://dvcs.w3.org/hg/IndexedDB/rev/fa1c7695ba67</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>