Re: W3C Working Draft for Data Store API

Hi Eduardo,

On Tue, Feb 11, 2014 at 11:47 AM, EDUARDO FULLEA CARRERA <efc@tid.es> wrote:
>> Promise<index> add(any data, DOMString[] props);
>
> Not sure the benefits of case 3 are worth the complexity. Is there a real demand for that?
> In any case we may want to separate (and probably rename) the function from the regular add (case 2)

I also tend to skip use case 3 for now. That would leave us with this API:
1. Promise update(any data, DOMString id);
    // with DB update semantics, i.e. if id does not exist, then fail.
2. Promise<index> insert(any data);
    // with DB insert semantics, and for that reason let us not call
it 'add' (which should be reserved for the case we will at any point
implement the 'insert if not exist, otherwise update' use case.

Best regards,
Zoltan

Received on Tuesday, 11 February 2014 09:54:57 UTC