Skip to content

IDBFactory

Values

cmp

Compares two values as keys. Returns -1 if key1 precedes key2, 1 if key2 precedes key1, and 0 if the keys are equal.

Throws a "DataError" DOMException if either input is not a valid key. Read more on MDN

let cmp: (
WebAPI.IndexedDBAPI.idbFactory,
~first: JSON.t,
~second: JSON.t,
) => int

Parameters

WebAPI.IndexedDBAPI.idbFactory JSON.t JSON.t

Return type

int

databases

let databases: WebAPI.IndexedDBAPI.idbFactory => Promise.t<
array<WebAPI.IndexedDBAPI.idbDatabaseInfo>,
>

Parameters

WebAPI.IndexedDBAPI.idbFactory

Return type

Promise.t< array< WebAPI.IndexedDBAPI.idbDatabaseInfo > >

deleteDatabase

Attempts to delete the named database. If the database already exists and there are open connections that don't close in response to a versionchange event, the request will be blocked until all they close. If the request is successful request's result will be null. Read more on MDN

let deleteDatabase: (
WebAPI.IndexedDBAPI.idbFactory,
string,
) => WebAPI.IndexedDBAPI.idbOpenDBRequest

open_

Attempts to open a connection to the named database with the current version, or 1 if it does not already exist. If the request is successful request's result will be the connection. Read more on MDN

let open_: (
WebAPI.IndexedDBAPI.idbFactory,
~name: string,
~version: int=?,
) => WebAPI.IndexedDBAPI.idbOpenDBRequest

Parameters

WebAPI.IndexedDBAPI.idbFactory string option< int >

Return type

WebAPI.IndexedDBAPI.idbOpenDBRequest