Interface

IDBDatabase

IDBDatabase

This IndexedDB API interface provides a connection to a database; you can use an IDBDatabase object to open a transaction on your database then create, manipulate, and delete objects (data) in that database. The interface provides the only way to get and manage versions of the database.

View Source js/lib.dom.d.ts, line 4326

Members

void

# close

Closes the connection once all running transactions have finished.

View Source js/lib.dom.d.ts, line 4344

IDBObjectStore

# createObjectStore

Creates a new object store with the given name and options and returns a new IDBObjectStore.

Throws a "InvalidStateError" DOMException if not called within an upgrade transaction.

View Source js/lib.dom.d.ts, line 4349

void

# deleteObjectStore

Deletes the object store with the given name.

Throws a "InvalidStateError" DOMException if not called within an upgrade transaction.

View Source js/lib.dom.d.ts, line 4356

string

# name

Returns the name of the database.

View Source js/lib.dom.d.ts, line 4329

DOMStringList

# objectStoreNames

Returns a list of the names of object stores in the database.

View Source js/lib.dom.d.ts, line 4334

IDBTransaction

# transaction

Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names.

View Source js/lib.dom.d.ts, line 4363

number

# version

Returns the version of the database.

View Source js/lib.dom.d.ts, line 4339