W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2012

Put request need created flag

From: Kyaw Tun <kyawtun@yathit.com>
Date: Thu, 15 Nov 2012 00:16:39 +0800
Message-ID: <4c2yaictm9nw6vhdj33kcyn1.1352909374298@email.android.com>
To: public-webapps@w3.org
I have hard to understand how to use add method effectively.

On my indexeddb wrapper library development, the wrapper database instance dispatches installable event for creating, deleting and updating a record. Interested components register and listen to update UI or sync to server. That requires differentiating created and updated on put call. On the otherhand add method throw Error rather than eventing onerror event when confict. So it usage will be very rare.

I wish put method request indicates some flag to differentiate between created or updated.

I could forget about put and use cursor directly, but still requires extra existance test request. 

Received on Wednesday, 14 November 2012 16:17:18 UTC

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