IdbFactory Class
The entry point of IndexedDB of a window or a worker (https://w3c.github.io/IndexedDB/#idbfactory): opens and deletes the databases of its origin, stored by BrowsingContextOptions.IndexedDB.
public sealed class IdbFactoryMethods
| Name | Description |
|---|---|
| Cmp(object?, object?) | Compares two keys (https://w3c.github.io/IndexedDB/#dom-idbfactory-cmp): -1, 0 or 1. |
| Databases() | Returns the names and the versions of the databases of the origin (https://w3c.github.io/IndexedDB/#dom-idbfactory-databases). |
| DeleteDatabase(string) | Deletes a database (https://w3c.github.io/IndexedDB/#dom-idbfactory-deletedatabase). |
| Open(string, ulong?) | Opens a connection to a database, creating or upgrading it (https://w3c.github.io/IndexedDB/#dom-idbfactory-open). |
Cmp(object?, object?)
IdbFactory.csCompares two keys (https://w3c.github.io/IndexedDB/#dom-idbfactory-cmp): -1, 0 or 1.
Databases()
IdbFactory.csReturns the names and the versions of the databases of the origin (https://w3c.github.io/IndexedDB/#dom-idbfactory-databases).
public Task<IReadOnlyList<IdbDatabaseInfo>> Databases()DeleteDatabase(string)
IdbFactory.csDeletes a database (https://w3c.github.io/IndexedDB/#dom-idbfactory-deletedatabase).
public IdbOpenDBRequest DeleteDatabase(string name)Parameters
namestring- The name of the database.
Returns
Exceptions
DomException- A
SecurityErrorwhen the origin is opaque.
See also
Open(string, ulong?)
IdbFactory.csOpens a connection to a database, creating or upgrading it (https://w3c.github.io/IndexedDB/#dom-idbfactory-open).
public IdbOpenDBRequest Open(string name, ulong? version = null)Parameters
namestring- The name of the database.
versionulong?- The version of the database, or null for the current version (1 for a new database).
Returns
Exceptions
TypeErrorException- The version is 0.
DomException- A
SecurityErrorwhen the origin is opaque.