IDBObjectStore
Values
add
Adds or updates a record in store with the given value and key.
If the store uses in-line keys and key is specified a "DataError" DOMException will be thrown.
If put() is used, any existing record with the key will be replaced. If add() is used, and if a record with the key already exists the request will fail, with request's error set to a "ConstraintError" DOMException.
If successful, request's result will be the record's key.Read more on MDN
letadd: (WebAPI.IndexedDBAPI.idbObjectStore,~value:JSON.t,~key:WebAPI.IndexedDBAPI.idbValidKey=?,)=>WebAPI.IndexedDBAPI.idbRequest<WebAPI.IndexedDBAPI.idbValidKey,>Parameters
WebAPI.IndexedDBAPI.idbObjectStore Stdlib.JSON.t option<WebAPI.IndexedDBAPI.idbValidKey >Return type
WebAPI.IndexedDBAPI.idbRequest<WebAPI.IndexedDBAPI.idbValidKey >clear
Deletes all records in store.
If successful, request's result will be undefined.Read more on MDN
letclear:WebAPI.IndexedDBAPI.idbObjectStore=>WebAPI.IndexedDBAPI.idbRequest<unit,>count
Retrieves the number of records matching the given key or key range in query.
If successful, request's result will be the count.Read more on MDN
letcount: (WebAPI.IndexedDBAPI.idbObjectStore,~query:WebAPI.Prelude.any=?,)=>WebAPI.IndexedDBAPI.idbRequest<int>Parameters
WebAPI.IndexedDBAPI.idbObjectStore option<WebAPI.Prelude.any >Return type
WebAPI.IndexedDBAPI.idbRequest< int >createIndex
Creates a new index in store with the given name, keyPath and options and returns a new IDBIndex. If the keyPath and options define constraints that cannot be satisfied with the data already in store the upgrade transaction will abort with a "ConstraintError" DOMException.
Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.Read more on MDN
letcreateIndex: (WebAPI.IndexedDBAPI.idbObjectStore,~name:string,~keyPath:string,~options:WebAPI.IndexedDBAPI.idbIndexParameters=?,)=>WebAPI.IndexedDBAPI.idbIndexParameters
WebAPI.IndexedDBAPI.idbObjectStore string string option<WebAPI.IndexedDBAPI.idbIndexParameters >Return type
WebAPI.IndexedDBAPI.idbIndexcreateIndex2
Creates a new index in store with the given name, keyPath and options and returns a new IDBIndex. If the keyPath and options define constraints that cannot be satisfied with the data already in store the upgrade transaction will abort with a "ConstraintError" DOMException.
Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.Read more on MDN
letcreateIndex2: (WebAPI.IndexedDBAPI.idbObjectStore,~name:string,~keyPath:array<string>,~options:WebAPI.IndexedDBAPI.idbIndexParameters=?,)=>WebAPI.IndexedDBAPI.idbIndexParameters
WebAPI.IndexedDBAPI.idbObjectStore string array< string > option<WebAPI.IndexedDBAPI.idbIndexParameters >Return type
WebAPI.IndexedDBAPI.idbIndexdelete
Deletes records in store with the given key or in the given key range in query.
If successful, request's result will be undefined.Read more on MDN
letdelete: (WebAPI.IndexedDBAPI.idbObjectStore,WebAPI.Prelude.any,)=>WebAPI.IndexedDBAPI.idbRequest<unit>Parameters
WebAPI.IndexedDBAPI.idbObjectStoreWebAPI.Prelude.anyReturn type
WebAPI.IndexedDBAPI.idbRequest< unit >deleteIndex
Deletes the index in store with the given name.
Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.Read more on MDN
letdeleteIndex: (WebAPI.IndexedDBAPI.idbObjectStore,string)=>unitget
Retrieves the value of the first record matching the given key or key range in query.
If successful, request's result will be the value, or undefined if there was no matching record.Read more on MDN
letget: (WebAPI.IndexedDBAPI.idbObjectStore,WebAPI.Prelude.any,)=>WebAPI.IndexedDBAPI.idbRequest<JSON.t>Parameters
WebAPI.IndexedDBAPI.idbObjectStoreWebAPI.Prelude.anyReturn type
WebAPI.IndexedDBAPI.idbRequest< Stdlib.JSON.t >getAll
Retrieves the values of the records matching the given key or key range in query (up to count if given).
If successful, request's result will be an Array of the values.Read more on MDN
letgetAll: (WebAPI.IndexedDBAPI.idbObjectStore,~query:WebAPI.Prelude.any=?,~count:int=?,)=>WebAPI.IndexedDBAPI.idbRequest<array<JSON.t>>Parameters
WebAPI.IndexedDBAPI.idbObjectStore option<WebAPI.Prelude.any > option< int >Return type
WebAPI.IndexedDBAPI.idbRequest< array< Stdlib.JSON.t > >getAllKeys
Retrieves the keys of records matching the given key or key range in query (up to count if given).
If successful, request's result will be an Array of the keys.Read more on MDN
letgetAllKeys: (WebAPI.IndexedDBAPI.idbObjectStore,~query:WebAPI.Prelude.any=?,~count:int=?,)=>WebAPI.IndexedDBAPI.idbRequest<array<WebAPI.IndexedDBAPI.idbValidKey>,>Parameters
WebAPI.IndexedDBAPI.idbObjectStore option<WebAPI.Prelude.any > option< int >Return type
WebAPI.IndexedDBAPI.idbRequest< array<WebAPI.IndexedDBAPI.idbValidKey > >getKey
Retrieves the key of the first record matching the given key or key range in query.
If successful, request's result will be the key, or undefined if there was no matching record.Read more on MDN
letgetKey: (WebAPI.IndexedDBAPI.idbObjectStore,WebAPI.Prelude.any,)=>WebAPI.IndexedDBAPI.idbRequest<WebAPI.Prelude.any>index
letindex: (WebAPI.IndexedDBAPI.idbObjectStore,string,)=>WebAPI.IndexedDBAPI.idbIndexopenCursor
Opens a cursor over the records matching query, ordered by direction. If query is null, all records in store are matched.
If successful, request's result will be an IDBCursorWithValue pointing at the first matching record, or null if there were no matching records.Read more on MDN
letopenCursor: (WebAPI.IndexedDBAPI.idbObjectStore,~query:WebAPI.Prelude.any=?,~direction:WebAPI.IndexedDBAPI.idbCursorDirection=?,)=>WebAPI.IndexedDBAPI.idbRequest<WebAPI.Prelude.any>Parameters
WebAPI.IndexedDBAPI.idbObjectStore option<WebAPI.Prelude.any > option<WebAPI.IndexedDBAPI.idbCursorDirection >Return type
WebAPI.IndexedDBAPI.idbRequest<WebAPI.Prelude.any >openKeyCursor
Opens a cursor with key only flag set over the records matching query, ordered by direction. If query is null, all records in store are matched.
If successful, request's result will be an IDBCursor pointing at the first matching record, or null if there were no matching records.Read more on MDN
letopenKeyCursor: (WebAPI.IndexedDBAPI.idbObjectStore,~query:WebAPI.Prelude.any=?,~direction:WebAPI.IndexedDBAPI.idbCursorDirection=?,)=>WebAPI.IndexedDBAPI.idbRequest<WebAPI.Prelude.any>Parameters
WebAPI.IndexedDBAPI.idbObjectStore option<WebAPI.Prelude.any > option<WebAPI.IndexedDBAPI.idbCursorDirection >Return type
WebAPI.IndexedDBAPI.idbRequest<WebAPI.Prelude.any >put
Adds or updates a record in store with the given value and key.
If the store uses in-line keys and key is specified a "DataError" DOMException will be thrown.
If put() is used, any existing record with the key will be replaced. If add() is used, and if a record with the key already exists the request will fail, with request's error set to a "ConstraintError" DOMException.
If successful, request's result will be the record's key.Read more on MDN
letput: (WebAPI.IndexedDBAPI.idbObjectStore,~value:JSON.t,~key:WebAPI.IndexedDBAPI.idbValidKey=?,)=>WebAPI.IndexedDBAPI.idbRequest<WebAPI.IndexedDBAPI.idbValidKey,>