Skip to content

Truly independent web browser

1.6 KB
Raw Blame
[Exposed=(Window,Worker), ImplementedIn=Rust]
interface IDBObjectStore {
    attribute DOMString name;
    [ImplementedAs=key_path_value, NeedsCallerRealm] readonly attribute any keyPath;
    readonly attribute DOMStringList indexNames;
    [SameObject] readonly attribute IDBTransaction transaction;
    readonly attribute boolean autoIncrement;
    
    [NewObject] IDBRequest put(any value, optional any key);
    [NewObject] IDBRequest add(any value, optional any key);
    [NewObject] IDBRequest delete(any query);
    [NewObject] IDBRequest clear();
    [NewObject] IDBRequest get(any query);
    [NewObject] IDBRequest getKey(any query);
    [NewObject] IDBRequest getAll(optional any queryOrOptions, optional [EnforceRange] unsigned long count);
    [NewObject] IDBRequest getAllKeys(optional any queryOrOptions, optional [EnforceRange] unsigned long count);
    [NewObject] IDBRequest getAllRecords(optional IDBGetAllOptions options = {});
    [NewObject] IDBRequest count(optional any query);
    [NewObject] IDBRequest openCursor(optional any query, optional IDBCursorDirection direction = "next");
    [NewObject] IDBRequest openKeyCursor(optional any query, optional IDBCursorDirection direction = "next");
    IDBIndex index(DOMString name);
    [NewObject] IDBIndex createIndex(DOMString name, (DOMString or sequence<DOMString>) keyPath, optional IDBIndexParameters options = {});
    undefined deleteIndex(DOMString name);
};

dictionary IDBIndexParameters {
    boolean unique = false;
    boolean multiEntry = false;
};

dictionary IDBGetAllOptions {
    any query = null;
    [EnforceRange] unsigned long count;
    IDBCursorDirection direction = "next";
};