Re: [w3c/IndexedDB] Define flush-to-disk guarantees and control (#50)

TPAC 2019 Web Apps breakout: **#CaliforniaRelaxed**

* Attendees agreed with durability control on [storage buckets](https://github.com/whatwg/storage/issues/2) as useful
* Attendees agreed that allowing durability control on transactions was also fine, as long as these are not in conflict
* Proposed switching proposal from a boolean to an enum allows for this: "strict", "relaxed", "default" - the latter would inherit from the bucket's default.

IDL sketch:

```webidl
enum IDBTransactionDurability { "default", "strict", "relaxed" };

dictionary IDBTransactionOptions {
    IDBTransactionDurability durability = "default";
};

// in IDBDatabase:
  ...
  [NewObject] IDBTransaction transaction(
       (DOMString or sequence<DOMString>) storeNames,
       optional IDBTransactionMode mode = "readonly",
       optional IDBTransactionOptions options = {});
  ...
```

@asutherland - how does that look? Happy to bikeshed the naming.

Also: Should we add a readonly `durability` property on `IDBTransaction` to allow introspection? Since this property is a hint to the UA it's not as critical as in other cases. 



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/IndexedDB/issues/50#issuecomment-533350205

Received on Thursday, 19 September 2019 23:52:53 UTC