IDBFactory
import { IDBFactory } from "https://raw.githubusercontent.com/aaronhuggins/indexeddb/main/ponyfill.ts";
In the following code snippet, we make a request to open a database, and include handlers for the success and error cases. For a full working example, see our To-do Notifications app (view example live.)
interface IDBFactory {
prototype: IDBFactory;
cmp(first: any, second: any): number;
databases(): Promise<IDBDatabaseInfo[]>;
deleteDatabase(name: string): IDBOpenDBRequest;
new (): IDBFactory;
}const IDBFactory;
§Properties
§
prototype: IDBFactory
[src]§Methods
§
cmp(first: any, second: any): number
[src]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.
§
deleteDatabase(name: string): IDBOpenDBRequest
[src]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.
§
new (): IDBFactory
[src]