RE: [IndexedDB] IDBCursor.update for cursors returned from IDBIndex.openCursor

2010-09-28 Thread Pablo Castro
I agree with Jonas on this. I think accessing the index values is an important feature (in addition to joins you can imagine add an extra property or two to the index key* to create a covering index and avoid fetching the object in a perf-critical path). That said, to me it's just about allowin

Re: [IndexedDB] IDBCursor.update for cursors returned from IDBIndex.openCursor

2010-09-22 Thread Shawn Wilsher
On 9/17/2010 3:14 PM, Jonas Sicking wrote: How do you then guarantee that a transaction that spans multiple objectStores either fully succeeds or is fully rolled back? Especially in the event of a crash during commit. If you don't use write ahead logging, and connect to each database with ATTACH

Re: [IndexedDB] IDBCursor.update for cursors returned from IDBIndex.openCursor

2010-09-20 Thread Jonas Sicking
On Fri, Sep 17, 2010 at 3:14 PM, Jonas Sicking wrote: >> Given that the key-returning versions of these functions are just >> optimizations, at the very least, we should change the names though: >> get->getKey (or maybe getPrimaryKey?) >> openCursor->openKeyCursor (or maybe openPrimaryKeyCursor?)

Re: [IndexedDB] IDBCursor.update for cursors returned from IDBIndex.openCursor

2010-09-17 Thread Jonas Sicking
On Fri, Sep 17, 2010 at 2:46 AM, Jeremy Orlow wrote: > On Fri, Sep 17, 2010 at 1:06 AM, Jonas Sicking wrote: >> >> On Thu, Sep 16, 2010 at 2:23 PM, Jeremy Orlow wrote: >> > On Thu, Sep 16, 2010 at 8:53 PM, Jonas Sicking  wrote: >> >> >> >> On Thu, Sep 16, 2010 at 2:15 AM, Jeremy Orlow >> >> wro

Re: [IndexedDB] IDBCursor.update for cursors returned from IDBIndex.openCursor

2010-09-17 Thread Jeremy Orlow
On Fri, Sep 17, 2010 at 1:06 AM, Jonas Sicking wrote: > On Thu, Sep 16, 2010 at 2:23 PM, Jeremy Orlow wrote: > > On Thu, Sep 16, 2010 at 8:53 PM, Jonas Sicking wrote: > >> > >> On Thu, Sep 16, 2010 at 2:15 AM, Jeremy Orlow > wrote: > >> > Wait a sec. What are the use cases for non-object curs

Re: [IndexedDB] IDBCursor.update for cursors returned from IDBIndex.openCursor

2010-09-16 Thread Jonas Sicking
On Thu, Sep 16, 2010 at 2:23 PM, Jeremy Orlow wrote: > On Thu, Sep 16, 2010 at 8:53 PM, Jonas Sicking  wrote: >> >> On Thu, Sep 16, 2010 at 2:15 AM, Jeremy Orlow wrote: >> > Wait a sec.  What are the use cases for non-object cursors anyway?  They >> > made perfect sense back when we allowed expli

Re: [IndexedDB] IDBCursor.update for cursors returned from IDBIndex.openCursor

2010-09-16 Thread Jeremy Orlow
On Thu, Sep 16, 2010 at 11:04 PM, Tab Atkins Jr. wrote: > On Thu, Sep 16, 2010 at 2:23 PM, Jeremy Orlow wrote: > > I think we should leave in openObjectCursor/getObject but remove > > openCursor/get for now. We can then revisit any of these features as > soon > > as there are implementations (bo

Re: [IndexedDB] IDBCursor.update for cursors returned from IDBIndex.openCursor

2010-09-16 Thread Tab Atkins Jr.
On Thu, Sep 16, 2010 at 2:23 PM, Jeremy Orlow wrote: > I think we should leave in openObjectCursor/getObject but remove > openCursor/get for now.  We can then revisit any of these features as soon > as there are implementations (both in the UAs and in web sites) mature > enough for us to get real

Re: [IndexedDB] IDBCursor.update for cursors returned from IDBIndex.openCursor

2010-09-16 Thread Jeremy Orlow
On Thu, Sep 16, 2010 at 8:53 PM, Jonas Sicking wrote: > On Thu, Sep 16, 2010 at 2:15 AM, Jeremy Orlow wrote: > > Wait a sec. What are the use cases for non-object cursors anyway? They > > made perfect sense back when we allowed explicit index management, but > now > > they kind of seem like a

Re: [IndexedDB] IDBCursor.update for cursors returned from IDBIndex.openCursor

2010-09-16 Thread Jonas Sicking
On Thu, Sep 16, 2010 at 4:08 AM, Jeremy Orlow wrote: > On Thu, Sep 16, 2010 at 10:15 AM, Jeremy Orlow wrote: >> >> On Wed, Sep 15, 2010 at 10:45 PM, Jonas Sicking wrote: >>> >>> Heh, I've also been thinking about this exact issue lately. There is a >>> similar question for IDBCursor.delete. >>>

Re: [IndexedDB] IDBCursor.update for cursors returned from IDBIndex.openCursor

2010-09-16 Thread Jonas Sicking
On Thu, Sep 16, 2010 at 2:15 AM, Jeremy Orlow wrote: > On Wed, Sep 15, 2010 at 10:45 PM, Jonas Sicking wrote: >> >> Heh, I've also been thinking about this exact issue lately. There is a >> similar question for IDBCursor.delete. >> >> On Wed, Sep 15, 2010 at 8:55 AM, Jeremy Orlow wrote: >> > I t

Re: [IndexedDB] IDBCursor.update for cursors returned from IDBIndex.openCursor

2010-09-16 Thread Andrei Popescu
On Thu, Sep 16, 2010 at 10:15 AM, Jeremy Orlow wrote: > On Wed, Sep 15, 2010 at 10:45 PM, Jonas Sicking wrote: >> >> Heh, I've also been thinking about this exact issue lately. There is a >> similar question for IDBCursor.delete. >> >> On Wed, Sep 15, 2010 at 8:55 AM, Jeremy Orlow wrote: >> > I

Re: [IndexedDB] IDBCursor.update for cursors returned from IDBIndex.openCursor

2010-09-16 Thread Jeremy Orlow
On Thu, Sep 16, 2010 at 10:15 AM, Jeremy Orlow wrote: > On Wed, Sep 15, 2010 at 10:45 PM, Jonas Sicking wrote: > >> Heh, I've also been thinking about this exact issue lately. There is a >> similar question for IDBCursor.delete. >> >> On Wed, Sep 15, 2010 at 8:55 AM, Jeremy Orlow >> wrote: >> >

Re: [IndexedDB] IDBCursor.update for cursors returned from IDBIndex.openCursor

2010-09-16 Thread Jeremy Orlow
On Wed, Sep 15, 2010 at 10:45 PM, Jonas Sicking wrote: > Heh, I've also been thinking about this exact issue lately. There is a > similar question for IDBCursor.delete. > > On Wed, Sep 15, 2010 at 8:55 AM, Jeremy Orlow wrote: > > I think it's clear what IDBCursor does when created from > > IDBOb

Re: [IndexedDB] IDBCursor.update for cursors returned from IDBIndex.openCursor

2010-09-15 Thread Jonas Sicking
Heh, I've also been thinking about this exact issue lately. There is a similar question for IDBCursor.delete. On Wed, Sep 15, 2010 at 8:55 AM, Jeremy Orlow wrote: > I think it's clear what IDBCursor does when created from > IDBObjectStore.openCursor or IDBIndex.openObjectCursor: it modifies the >

[IndexedDB] IDBCursor.update for cursors returned from IDBIndex.openCursor

2010-09-15 Thread Jeremy Orlow
I think it's clear what IDBCursor does when created from IDBObjectStore.openCursor or IDBIndex.openObjectCursor: it modifies the objectStore's value and updates all indexes (or does nothing and returns an error if all of that can't be done while satisfying the constraints). But what about IDBCurso