Re: [IndexedDB] Implicit transactions

2010-08-06 Thread Jeremy Orlow
On Fri, Aug 6, 2010 at 1:56 PM, Jeremy Orlow jor...@chromium.org wrote: On Thu, Aug 5, 2010 at 8:56 PM, Jonas Sicking jo...@sicking.cc wrote: Ok, I'm going to start by taking a step back here. There is no such thing as implicit transactions. db.objectStore(foo, mode) is just syntactic

Re: [IndexedDB] Implicit transactions

2010-08-06 Thread Andrei Popescu
On Fri, Aug 6, 2010 at 1:56 PM, Jeremy Orlow jor...@chromium.org wrote: On Thu, Aug 5, 2010 at 8:56 PM, Jonas Sicking jo...@sicking.cc wrote: Ok, I'm going to start by taking a step back here. There is no such thing as implicit transactions. db.objectStore(foo, mode) is just syntactic

Re: [IndexedDB] Implicit transactions

2010-08-06 Thread Jonas Sicking
On Fri, Aug 6, 2010 at 6:52 AM, Jeremy Orlow jor...@chromium.org wrote: On Fri, Aug 6, 2010 at 1:56 PM, Jeremy Orlow jor...@chromium.org wrote: On Thu, Aug 5, 2010 at 8:56 PM, Jonas Sicking jo...@sicking.cc wrote: Ok, I'm going to start by taking a step back here. There is no such thing as

Re: [IndexedDB] Implicit transactions

2010-08-06 Thread Jeremy Orlow
On Fri, Aug 6, 2010 at 4:04 PM, Jonas Sicking jo...@sicking.cc wrote: On Fri, Aug 6, 2010 at 6:52 AM, Jeremy Orlow jor...@chromium.org wrote: On Fri, Aug 6, 2010 at 1:56 PM, Jeremy Orlow jor...@chromium.org wrote: On Thu, Aug 5, 2010 at 8:56 PM, Jonas Sicking jo...@sicking.cc wrote:

Re: [IndexedDB] Implicit transactions

2010-08-06 Thread Jonas Sicking
On Fri, Aug 6, 2010 at 8:06 AM, Jeremy Orlow jor...@chromium.org wrote: On Fri, Aug 6, 2010 at 4:04 PM, Jonas Sicking jo...@sicking.cc wrote: On Fri, Aug 6, 2010 at 6:52 AM, Jeremy Orlow jor...@chromium.org wrote: On Fri, Aug 6, 2010 at 1:56 PM, Jeremy Orlow jor...@chromium.org wrote:

Re: [IndexedDB] Implicit transactions

2010-08-05 Thread Jeremy Orlow
On Wed, Aug 4, 2010 at 7:47 PM, Shawn Wilsher sdwi...@mozilla.com wrote: On 8/4/2010 10:53 AM, Jeremy Orlow wrote: Whoatransaction() is synchronous?!? Ok, so I guess the entire premise of my question was super confused. :-) It is certainly spec'd that way [1]. The locks do not

Re: [IndexedDB] Implicit transactions

2010-08-05 Thread Jonas Sicking
Ok, I'm going to start by taking a step back here. There is no such thing as implicit transactions. db.objectStore(foo, mode) is just syntactic sugar for db.transaction([foo], mode).objectStore(foo) so it always starts a new transaction. I think for now, lets take db.objectStore(..) out of

Re: [IndexedDB] Implicit transactions

2010-08-04 Thread Andrei Popescu
On Wed, Aug 4, 2010 at 4:42 PM, Jeremy Orlow jor...@chromium.org wrote: In the IndexedDB spec, there are two ways to create a transaction.  One is explicit (by calling IDBDatabase.transaction()) and one is implicit (for example, by calling IDBDatabase.objectStore.get(someKey)).  I have

Re: [IndexedDB] Implicit transactions

2010-08-04 Thread Jeremy Orlow
On Wed, Aug 4, 2010 at 5:26 PM, Andrei Popescu andr...@google.com wrote: On Wed, Aug 4, 2010 at 4:42 PM, Jeremy Orlow jor...@chromium.org wrote: In the IndexedDB spec, there are two ways to create a transaction. One is explicit (by calling IDBDatabase.transaction()) and one is implicit

Re: [IndexedDB] Implicit transactions

2010-08-04 Thread Andrei Popescu
On Wed, Aug 4, 2010 at 5:46 PM, Jeremy Orlow jor...@chromium.org wrote: On Wed, Aug 4, 2010 at 5:26 PM, Andrei Popescu andr...@google.com wrote: On Wed, Aug 4, 2010 at 4:42 PM, Jeremy Orlow jor...@chromium.org wrote: In the IndexedDB spec, there are two ways to create a transaction.  One is

Re: [IndexedDB] Implicit transactions

2010-08-04 Thread Jeremy Orlow
I talked to Andrei in person. He seemed to think this was discussed and agreed upon sometime earlier but agreed the spec could be more clear. On Wed, Aug 4, 2010 at 5:46 PM, Jeremy Orlow jor...@chromium.org wrote: On Wed, Aug 4, 2010 at 5:26 PM, Andrei Popescu andr...@google.com wrote: On

Re: [IndexedDB] Implicit transactions

2010-08-04 Thread Shawn Wilsher
On 8/4/2010 10:24 AM, Jeremy Orlow wrote: Jonas/Shawn: Since it seems you've been getting some feedback on your implementation, do you have any data to suggest that implicit transactions are being used and considered helpful in the wild? I have not yet seen any specific feedback about it as

Re: [IndexedDB] Implicit transactions

2010-08-04 Thread Shawn Wilsher
On 8/4/2010 8:42 AM, Jeremy Orlow wrote: In the IndexedDB spec, there are two ways to create a transaction. One is explicit (by calling IDBDatabase.transaction()) and one is implicit (for example, by calling IDBDatabase.objectStore.get(someKey)). I have questions about the latter, but before

Re: [IndexedDB] Implicit transactions

2010-08-04 Thread Jeremy Orlow
On Wed, Aug 4, 2010 at 6:33 PM, Shawn Wilsher sdwi...@mozilla.com wrote: On 8/4/2010 8:42 AM, Jeremy Orlow wrote: In the IndexedDB spec, there are two ways to create a transaction. One is explicit (by calling IDBDatabase.transaction()) and one is implicit (for example, by calling

Re: [IndexedDB] Implicit transactions

2010-08-04 Thread Shawn Wilsher
On 8/4/2010 10:53 AM, Jeremy Orlow wrote: Whoatransaction() is synchronous?!? Ok, so I guess the entire premise of my question was super confused. :-) It is certainly spec'd that way [1]. The locks do not get acquired until the first actual bit of work is done though. Cheers,

Re: [IndexedDB] Implicit transactions

2010-08-04 Thread Mikeal Rogers
For what it's worth I haven't found using it this way to be that hard or confusing but that could be because I'm a little more aware of the underlying implications when opening object stores. -Mikeal On Wed, Aug 4, 2010 at 11:47 AM, Shawn Wilsher sdwi...@mozilla.com wrote: On 8/4/2010 10:53