InMemoryIndexedDBBackend Class
An IndexedDBBackend that keeps the databases in memory: the default backend of the browsing contexts (see BrowsingContextOptions.IndexedDB). It is thread-safe, and can be shared by several browsing contexts.
public sealed class InMemoryIndexedDBBackend : IndexedDBBackend- Inheritance
IndexedDBBackendInMemoryIndexedDBBackend
Constructors
| Name | Description |
|---|---|
| InMemoryIndexedDBBackend() |
InMemoryIndexedDBBackend()
InMemoryIndexedDBBackend.cspublic InMemoryIndexedDBBackend()No documentation is available.
Methods
| Name | Description |
|---|---|
| BeginTransaction(string, string, IdbTransactionMode, IReadOnlyList<long>) | Begins a transaction on a database. A IdbTransactionMode.VersionChange transaction creates the database (with the version 0 and no object store) when it does not exist; aborting this transaction deletes it. |
| DeleteDatabase(string, string) | Deletes a database and its data (https://w3c.github.io/IndexedDB/#delete-a-database). Does nothing when it does not exist. |
| GetDatabase(string, string) | Returns the schema of a database, or null when the database does not exist. |
| GetDatabases(string) | Returns the name and the version of the databases of an origin (https://w3c.github.io/IndexedDB/#dom-idbfactory-databases). |
| GetUsage(string) | Returns an estimation of the number of bytes used by the databases of an origin (navigator.storage.estimate()). The default is 0: the usage is not reported. |
BeginTransaction(string, string, IdbTransactionMode, IReadOnlyList<long>)
InMemoryIndexedDBBackend.csBegins a transaction on a database. A IdbTransactionMode.VersionChange transaction creates the database (with the version 0 and no object store) when it does not exist; aborting this transaction deletes it.
public override IndexedDBBackendTransaction BeginTransaction(string origin, string name, IdbTransactionMode mode, IReadOnlyList<long> objectStoreIds)Parameters
originstring- The serialization of the origin.
namestring- The name of the database.
modeIdbTransactionMode- The mode of the transaction.
objectStoreIdsIReadOnlyList<long>- The ids of the object stores of the scope of the transaction (all the object stores for a version change transaction).
Returns
DeleteDatabase(string, string)
InMemoryIndexedDBBackend.csGetDatabase(string, string)
InMemoryIndexedDBBackend.csReturns the schema of a database, or null when the database does not exist.
public override IndexedDBDatabaseSchema? GetDatabase(string origin, string name)Parameters
Returns
GetDatabases(string)
InMemoryIndexedDBBackend.csReturns the name and the version of the databases of an origin (https://w3c.github.io/IndexedDB/#dom-idbfactory-databases).
public override IReadOnlyList<IndexedDBDatabaseInfo> GetDatabases(string origin)