dom/webidl/IDBObjectStore.webidl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     4  * You can obtain one at http://mozilla.org/MPL/2.0/.
     5  *
     6  * The origin of this IDL file is
     7  * https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBObjectStore
     8  */
    10 dictionary IDBObjectStoreParameters {
    11     // TODO (DOMString or sequence<DOMString>)? keyPath = null;
    12     any                                         keyPath = null;
    13     boolean                             autoIncrement = false;
    14 };
    16 interface IDBObjectStore {
    17     readonly    attribute DOMString      name;
    19     [Throws]
    20     readonly    attribute any            keyPath;
    22     [Throws]
    23     readonly    attribute DOMStringList  indexNames;
    24     readonly    attribute IDBTransaction transaction;
    25     readonly    attribute boolean        autoIncrement;
    27     [Throws]
    28     IDBRequest put (any value, optional any key);
    30     [Throws]
    31     IDBRequest add (any value, optional any key);
    33     [Throws]
    34     IDBRequest delete (any key);
    36     [Throws]
    37     IDBRequest get (any key);
    39     [Throws]
    40     IDBRequest clear ();
    42     [Throws]
    43     IDBRequest openCursor (optional any range, optional IDBCursorDirection direction = "next");
    45     // Bug 899972
    46     // IDBIndex   createIndex (DOMString name, (DOMString or sequence<DOMString>) keyPath, optional IDBIndexParameters optionalParameters);
    48     [Throws]
    49     IDBIndex   createIndex (DOMString name, DOMString keyPath, optional IDBIndexParameters optionalParameters);
    51     [Throws]
    52     IDBIndex   createIndex (DOMString name, sequence<DOMString> keyPath, optional IDBIndexParameters optionalParameters);
    54     [Throws]
    55     IDBIndex   index (DOMString name);
    57     [Throws]
    58     void       deleteIndex (DOMString indexName);
    60     [Throws]
    61     IDBRequest count (optional any key);
    62 };
    64 partial interface IDBObjectStore {
    65     // Success fires IDBTransactionEvent, result == array of values for given keys
    66     [Throws]
    67     IDBRequest mozGetAll (optional any key, optional unsigned long limit);
    69     [Pref="dom.indexedDB.experimental", Throws]
    70     IDBRequest getAll (optional any key, optional unsigned long limit);
    72     [Pref="dom.indexedDB.experimental", Throws]
    73     IDBRequest getAllKeys (optional any key, optional unsigned long limit);
    75     [Pref="dom.indexedDB.experimental", Throws]
    76     IDBRequest openKeyCursor (optional any range, optional IDBCursorDirection direction = "next");
    77 };

mercurial