IDBFactory

@native @JSGlobal @JSType
class IDBFactory extends Object

The IDBFactory interface of the IndexedDB API lets applications asynchronously access the indexed databases. The object that implements the interface is window.indexedDB. You open — that is, create and access — and delete a database with the object and not directly with IDBFactory. see IDBFactory on MDN

official documentation IDBFactory in w3c spec

class Object
trait Any
class Object
trait Matchable
class Any

Value members

Concrete methods

def cmp(first: IDBValue, second: IDBValue): Int

Compares two values as keys to determine equality and ordering for IndexedDB operations, such as storing and iterating.

Compares two values as keys to determine equality and ordering for IndexedDB operations, such as storing and iterating.

Returns:

One of the following:

  • -1 means 1st key is less than the 2nd key
  • 0 means 1st key is equal to the 2nd key
  • 1 means 1st key is greater than the 2nd key
def databases(): Promise[Array[IDBDatabaseInfo]]

Returns a promise which resolves to a list of objects giving a snapshot of the names and versions of databases within the origin.

Returns a promise which resolves to a list of objects giving a snapshot of the names and versions of databases within the origin.

This API is intended for web applications to introspect the use of databases, for example to clean up from earlier versions of a site’s code. Note that the result is a snapshot; there are no guarantees about the sequencing of the collection of the data or the delivery of the response with respect to requests to create, upgrade, or delete databases by this context or others.

def deleteDatabase(name: String): IDBOpenDBRequest[Unit]

The deletion operation (performed in a different thread) consists of the following steps:

The deletion operation (performed in a different thread) consists of the following steps:

def open(name: String, version: Double): IDBOpenDBRequest[IDBDatabase]

The open() method of the IDBFactory interface requests opening a connection to a database. see IDBFactory.open() on MDN

The open() method of the IDBFactory interface requests opening a connection to a database. see IDBFactory.open() on MDN

w3c spec ¶3.2.3 Opening a database

Inherited methods

def hasOwnProperty(v: String): Boolean
Inherited from:
Object
def isPrototypeOf(v: Object): Boolean
Inherited from:
Object
def propertyIsEnumerable(v: String): Boolean
Inherited from:
Object
def toLocaleString(): String
Inherited from:
Object
def valueOf(): Any
Inherited from:
Object