ladybird/Libraries/LibWeb/IndexedDB/IDBObjectStore.idl
2025-04-29 17:06:17 +02:00

32 lines
1.5 KiB
Text

#import <IndexedDB/IDBRequest.idl>
#import <IndexedDB/IDBIndex.idl>
#import <IndexedDB/IDBCursor.idl>
[Exposed=(Window,Worker)]
interface IDBObjectStore {
attribute DOMString name;
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);
[FIXME, NewObject] IDBRequest delete(any query);
[FIXME, NewObject] IDBRequest clear();
[NewObject] IDBRequest get(any query);
[FIXME, NewObject] IDBRequest getKey(any query);
[FIXME, NewObject] IDBRequest getAll(optional any query, optional [EnforceRange] unsigned long count);
[FIXME, NewObject] IDBRequest getAllKeys(optional any query, optional [EnforceRange] unsigned long count);
[NewObject] IDBRequest count(optional any query);
[FIXME, NewObject] IDBRequest openCursor(optional any query, optional IDBCursorDirection direction = "next");
[FIXME, 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;
};