Re: [indexeddb] Keypath attribute lookup question

2011-11-15 Thread Joshua Bell
On Tue, Nov 15, 2011 at 2:39 PM, Jonas Sicking wrote: > > Hmm.. good point. Looking at the documentation for the built-in types, > there are unfortunately also a host of constant properties on implicit > Number objects. But I'm not convinced that you should be able to index > on "somenumberProp.N

Re: [indexeddb] Keypath attribute lookup question

2011-11-15 Thread Joshua Bell
On Tue, Nov 15, 2011 at 1:33 PM, Jonas Sicking wrote: > On Tue, Nov 15, 2011 at 12:05 PM, Joshua Bell wrote: > > On Tue, Nov 15, 2011 at 11:42 AM, Jonas Sicking > wrote: > >> > >> On Tue, Nov 15, 2011 at 9:09 AM, Joshua Bell > wrote: > >> >> I d

Re: [indexeddb] Keypath attribute lookup question

2011-11-15 Thread Joshua Bell
On Tue, Nov 15, 2011 at 11:42 AM, Jonas Sicking wrote: > On Tue, Nov 15, 2011 at 9:09 AM, Joshua Bell wrote: > >> I do however think that we should simply state that getting the index > >> values will use the normal method for looking up properties on JS > >> obje

Re: [indexeddb] Keypath attribute lookup question

2011-11-15 Thread Joshua Bell
On Mon, Nov 14, 2011 at 5:52 PM, Jonas Sicking wrote: > What I think we should do is to get index values from the structured > clone of X. There at least two advantages of this: > > 1. The code to get index values can run on the database thread of the > IDB implementation. This enables a more par

Re: [indexeddb] Keypath attribute lookup question

2011-11-12 Thread Joshua Bell
On Fri, Nov 11, 2011 at 5:07 PM, Israel Hilerio wrote: > On Wednesday, November 09, 2011 4:47 PM, Joshua Bell wrote: > >On Wed, Nov 9, 2011 at 3:35 PM, Israel Hilerio > wrote: > >>In section "4.7 Steps for extracting a key from a value using a key > path" step

Re: [indexeddb] Keypath attribute lookup question

2011-11-09 Thread Joshua Bell
On Wed, Nov 9, 2011 at 3:35 PM, Israel Hilerio wrote: > In section "4.7 Steps for extracting a key from a value using a key path" > step #4 it states that: > * If object does not have an attribute named attribute, then skip the rest > of these steps and no value is returned. > > We want to verify

IndexedDB: IDBIndex.multientry attribute?

2011-11-08 Thread Joshua Bell
Should IDBIndex (and IDBIndexSync) expose a readonly boolean "multientry" attribute reflecting the multientry flag of the index? The index's unique flag is exposed in this way. Is there a reason the multientry flag is not?

Re: [IndexedDB] Array keys / circular references

2011-11-01 Thread Joshua Bell
On Tue, Nov 1, 2011 at 10:35 AM, Jonas Sicking wrote: > On Tue, Nov 1, 2011 at 9:24 AM, Joshua Bell wrote: > > I suggest an addition to the text e.g. "However, an Array values is only > a > > valid key if every item in the array is defined, if every item in the > arr

[IndexedDB] Array keys / circular references

2011-11-01 Thread Joshua Bell
So far as I can see, Section "3.1.3 Keys" doesn't seem to forbid circular references in keys which are Array objects, but this will obviously cause infinite loops in the comparison algorithm. This is in contrast to values, where the structured clone algorithm explicitly deals with cyclic references

Re: [IndexedDB] Throwing when *creating* a transaction

2011-10-31 Thread Joshua Bell
On Mon, Oct 31, 2011 at 3:02 PM, Jonas Sicking wrote: > Hi guys, > > Currently the spec contains the following sentence: > > "Conforming user agents must automatically abort a transaction at the > end of the scope in which it was created, if an exception is > propagated to that scope." > > This m

Re: [IndexedDB] IDBObjectStore.delete should accept a KeyRange

2011-10-26 Thread Joshua Bell
On Tue, Oct 25, 2011 at 4:50 PM, Israel Hilerio wrote: > On Monday, October 24, 2011 7:40 PM, Jonas Sicking wrote: > > > > While I was there it did occur to me that the fact that the .delete > function > > "returns" (through request.result in the async API) true/false depending > on if > > any rec

Re: [IndexedDB] Passing an empty array to IDBDatabase.transaction

2011-10-17 Thread Joshua Bell
On Fri, Oct 14, 2011 at 4:02 PM, Israel Hilerio wrote: > On Friday, October 14, 2011 3:57 PM, Jonas Sicking wrote: > > On Fri, Oct 14, 2011 at 2:57 PM, Israel Hilerio > > wrote: > > > On Friday, October 14, 2011 2:43 PM, Jonas Sicking wrote: > > >> On Fri, Oct 14, 2011 at 2:27 PM, Israel Hilerio

Re: [indexeddb] Exception type for NON_TRANSIENT_ERR code

2011-10-03 Thread Joshua Bell
On Mon, Oct 3, 2011 at 4:21 PM, Israel Hilerio wrote: > On Thursday, September 29, 2011 12:04 AM, Jonas Sicking wrote: > > NON_TRANSIENT_ERR > > I think in many cases we should simply throw a TypeError here. That seems > > to match closely to how TypeError is used by WebIDL now. > > As I'm mapping

IndexedDB: ordering sense of IDBFactory.cmp?

2011-10-03 Thread Joshua Bell
As we're implementing IDBFactory.cmp in WebKit we noticed that the ordering sense is reversed compared to C's strcmp/memcmp, Perl's cmp/<=> operators, etc. As currently spec'd, IDBFactory.cmp(first, second) returns 1 if first < second C's memcmp/strcmp(first, second) return -1 if first < second P

IndexedDB: spec nit - IDBFactory.cmp returns int?

2011-09-30 Thread Joshua Bell
In the WebIDL snippet and description for IDBFactory, the cmp method is defined as returning "int" which isn't defined in WebIDL (that I can see); presumably this should be "long" or one of the other signed numeric types? (short, byte, long long, float, double)

IndexedDB: API for enumerating databases within an origin

2011-09-21 Thread Joshua Bell
We've received feedback from early users of Chrome's implementation of IndexedDB requesting the ability to enumerate databases exist within an origin. We'd like the propose the following API addition to the IndexedDB API. TL;DR version: We add IDBFactory.getDatabaseNames() which asynchronously de

IndexedDB: negative zero as keys/values

2011-09-16 Thread Joshua Bell
There appears to be a minor edge case in the IndexedDB draft ( http://www.w3.org/TR/IndexedDB) - and inconsistencies between implementations - for the ECMAScript "negative zero" number value. While the other numeric edge cases - NaN and +/-Infinity - are called out explicitly in the draft when disc

<    1   2