Skip to content

IDBObjectStore

Generated from idl/indexeddb.webidl when the site was built at 7aa23e2.

IDBObjectStore is an interface in idl/indexeddb.webidl, exposed in Window, Worker. What it does is on MDN; this page says what niso has of it.

The web features its members belong to, each with its Baseline status on the web and how much of the feature’s WPT suite passes in niso (see Web platform support).

Feature On the web In niso Members
IndexedDB Widely available Partial 95% 2929 of 3061 subtests pass 20
IndexedDB getAllRecords() Limited availability Full 108 of 108 subtests pass 1
attribute
attribute DOMString name;
int32_t niso_idb_object_store_get_name(niso_dom* dom, niso_handle self, niso_str* out);
int32_t niso_idb_object_store_set_name(niso_dom* dom, niso_handle self, const char* value, size_t value_len);
attribute
[SameObject] readonly attribute any keyPath;
int32_t niso_idb_object_store_get_key_path(niso_dom* dom, niso_handle self, niso_bytes* out);

[SameObject]: the standard returns the same Array each time.

attribute
readonly attribute DOMStringList indexNames;
int32_t niso_idb_object_store_get_index_names(niso_dom* dom, niso_handle self, niso_handle* out);
attribute
[SameObject] readonly attribute IDBTransaction transaction;
int32_t niso_idb_object_store_get_transaction(niso_dom* dom, niso_handle self, niso_handle* out);
attribute
readonly attribute boolean autoIncrement;
int32_t niso_idb_object_store_get_auto_increment(niso_dom* dom, niso_handle self, bool* out);
operation
[NisoGlue, NewObject] IDBRequest put(any value, optional any key);
operation
[NisoGlue, NewObject] IDBRequest add(any value, optional any key);
operation
[NisoGlue, NewObject] IDBRequest delete(any query);
operation
[NewObject] IDBRequest clear();
int32_t niso_idb_object_store_clear(niso_dom* dom, niso_handle self, niso_handle* out);
operation
[NisoGlue, NewObject] IDBRequest get(any query);
operation
[NisoGlue, NewObject] IDBRequest getKey(any query);
operation
[NisoGlue, NewObject] IDBRequest getAll(optional any queryOrOptions, optional [EnforceRange] unsigned long count);
operation
[NisoGlue, NewObject] IDBRequest getAllKeys(optional any queryOrOptions, optional [EnforceRange] unsigned long count);
operation IndexedDB getAllRecords(): Full
[NisoGlue, NewObject] IDBRequest getAllRecords(optional IDBGetAllOptions options = {});
operation
[NisoGlue, NewObject] IDBRequest count(optional any query);
operation
[NisoGlue, NewObject] IDBRequest openCursor(optional any query, optional IDBCursorDirection direction = "next");
operation
[NisoGlue, NewObject] IDBRequest openKeyCursor(optional any query, optional IDBCursorDirection direction = "next");
operation
IDBIndex index(DOMString name);
int32_t niso_idb_object_store_index(niso_dom* dom, niso_handle self, const char* name, size_t name_len, niso_handle* out);
operation
[NisoGlue, NewObject] IDBIndex createIndex(DOMString name, (DOMString or sequence<DOMString>) keyPath, optional IDBIndexParameters options = {});
operation
undefined deleteIndex(DOMString name);
int32_t niso_idb_object_store_delete_index(niso_dom* dom, niso_handle self, const char* name, size_t name_len);
operation not in JS
[NisoInternal] undefined check(boolean write);
int32_t niso_idb_object_store_check(niso_dom* dom, niso_handle self, bool write);

The checks of the steps that read (write false) or write (true): the object store is not deleted, the transaction is active, and it is not read-only when writing.

operation not in JS
[NisoInternal] undefined checkPut(boolean keyGiven);
int32_t niso_idb_object_store_check_put(niso_dom* dom, niso_handle self, bool key_given);

add and put’s checks before the key is converted.

operation not in JS
[NisoInternal] IDBRequest putRecord(any value, any key, boolean noOverwrite);
int32_t niso_idb_object_store_put_record(niso_dom* dom, niso_handle self, const uint8_t* value, size_t value_len, const uint8_t* key, size_t key_len, bool no_overwrite, niso_handle* out);

add and put’s steps after the value is cloned; key is undefined when not given.

operation not in JS
[NisoInternal] IDBRequest query(unsigned short operation, any range, unsigned long count, unsigned short direction);
int32_t niso_idb_object_store_query(niso_dom* dom, niso_handle self, uint16_t operation, const uint8_t* range, size_t range_len, uint32_t count, uint16_t direction, niso_handle* out);

A request that reads or deletes records: operation is get (0), getKey (1), getAll (2), getAllKeys (3), getAllRecords (4), count (5), delete (6), openCursor (7) or openKeyCursor (8); direction is the IDBCursorDirection’s index, and a count of 0 is no limit.

operation not in JS
[NisoInternal] IDBIndex makeIndex(DOMString name, any keyPath, boolean unique, boolean multiEntry);
int32_t niso_idb_object_store_make_index(niso_dom* dom, niso_handle self, const char* name, size_t name_len, const uint8_t* key_path, size_t key_path_len, bool unique, bool multi_entry, niso_handle* out);

createIndex’s steps after its arguments are converted.

Members the web has, by the BCD keys web-features 3.45.0 lists, that idl/ doesn’t declare. The list is partial: web-features lists only the keys it maps to a feature.

  • worker_support (IndexedDB)