tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

IDBObjectStore.webidl (2457B)


      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://w3c.github.io/IndexedDB/#object-store-interface
      8 */
      9 
     10 dictionary IDBObjectStoreParameters {
     11    (DOMString or sequence<DOMString>)? keyPath = null;
     12    boolean                             autoIncrement = false;
     13 };
     14 
     15 [Exposed=(Window,Worker)]
     16 interface IDBObjectStore {
     17    [SetterThrows]
     18    attribute DOMString name;
     19 
     20    [Throws]
     21    readonly    attribute any            keyPath;
     22 
     23    readonly    attribute DOMStringList  indexNames;
     24    [SameObject] readonly attribute IDBTransaction transaction;
     25    readonly    attribute boolean        autoIncrement;
     26 
     27    [NewObject, Throws]
     28    IDBRequest put (any value, optional any key);
     29    [NewObject, Throws]
     30    IDBRequest add (any value, optional any key);
     31    [NewObject, Throws]
     32    IDBRequest delete (any key);
     33    [NewObject, Throws]
     34    IDBRequest clear ();
     35    [NewObject, Throws]
     36    IDBRequest get (any key);
     37    [NewObject, Throws]
     38    IDBRequest getKey (any key);
     39 
     40    // Success fires IDBTransactionEvent, result == array of values for given keys
     41    // If we decide to add use a counter for the mozGetAll function, we'll need
     42    // to pull it out into a sepatate operation with a BinaryName mapping to the
     43    // same underlying implementation.
     44    [NewObject, Throws, Alias="mozGetAll"]
     45    IDBRequest getAll(optional any query,
     46                      optional [EnforceRange] unsigned long count);
     47    [NewObject, Throws]
     48    IDBRequest getAllKeys(optional any query,
     49                          optional [EnforceRange] unsigned long count);
     50 
     51    [NewObject, Throws]
     52    IDBRequest count(optional any key);
     53 
     54    [NewObject, Throws]
     55    IDBRequest openCursor (optional any range, optional IDBCursorDirection direction = "next");
     56    [NewObject, Throws]
     57    IDBRequest openKeyCursor(optional any query,
     58                             optional IDBCursorDirection direction = "next");
     59    [NewObject, Throws]
     60    IDBIndex   createIndex (DOMString name, (DOMString or sequence<DOMString>) keyPath, optional IDBIndexParameters optionalParameters = {});
     61 
     62    [Throws]
     63    IDBIndex   index (DOMString name);
     64 
     65    [Throws]
     66    undefined       deleteIndex (DOMString indexName);
     67 };