W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2010

Re: [IndexedDB] Changing the default overwrite behavior of Put

From: Nikunj Mehta <nikunj@o-micron.com>
Date: Wed, 16 Jun 2010 10:46:01 -0700
Cc: Kris Zyp <kris@sitepen.com>, public-webapps WG <public-webapps@w3.org>
Message-Id: <41D42CD4-ECC6-4F0D-B2EB-77A3348602DF@o-micron.com>
To: Shawn Wilsher <sdwilsh@mozilla.com>

On Jun 16, 2010, at 9:58 AM, Shawn Wilsher wrote:

> On 6/16/2010 9:43 AM, Nikunj Mehta wrote:
>> There are three theoretical modes as you say. However, the second mode does not exist in practice. If you must overwrite, then you know that the record exists and hence don't need to specify that option.
> To be clear, you are saying that there are only two modes in practice:
> 1) add
> 2) add or modify
> But you don't believe that "modify" doesn't exist in practice?  In terms of SQL, these three concepts exists and get used all the time.  "add" maps to INSERT INTO, "add or modify" maps to INSERT OR REPLACE INTO, and "modify" maps to UPDATE.

IndexedDB is not SQL, I think you would agree. UPDATE is useful when you replace on a column, by column basis and, hence, need to do a blind update. When updating a record in IndexedDB, you'd have to be certain about the state of the entire record. Hence, it makes sense to leave out UPDATE semantics in IndexedDB.

>> So, in summary, I agree to splitting the put method in to two - put and putNoOverwrite. I am also in favor of retaining the name as put (contrasted with get). I would like to avoid bikeshedding on names even though there have been ample opportunities on this list lately with that.
> I think you are completely ignoring the arguments in this thread about the issues with naming it put.  I don't think it is bikeshedding; these seem like legitimate concerns.
> Cheers,
> Shawn
Received on Wednesday, 16 June 2010 17:46:39 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:25 UTC