@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="IDBDatabase")
public class IDBDatabase
extends EventTarget
| Modifier and Type | Field and Description |
|---|---|
EventHandler |
onabort
The onabort event handler of the IDBDatabase interface handles the abort event, fired when a transaction is aborted and bubbles up to the connection object.
|
EventHandler |
onclose
A function which is called when the close event is fired.
|
EventHandler |
onerror
The onerror event handler of the IDBDatabase interface handles the error event, fired when a request returns an error and bubbles up to the connection object.
|
EventHandler |
onversionchange
This example shows an IDBOpenDBRequest.onupgradeneeded block that creates a new object store; it also includes onerror and onabort functions to handle non-success cases, and an onversionchange function to notify when a database structure change has occurred.
|
| Modifier | Constructor and Description |
|---|---|
protected |
IDBDatabase() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAbortListener(EventListener callback) |
void |
addAbortListener(EventListener callback,
AddEventListenerOptions options) |
void |
addAbortListener(EventListener callback,
boolean useCapture) |
void |
addCloseListener(EventListener callback) |
void |
addCloseListener(EventListener callback,
AddEventListenerOptions options) |
void |
addCloseListener(EventListener callback,
boolean useCapture) |
void |
addErrorListener(EventListener callback) |
void |
addErrorListener(EventListener callback,
AddEventListenerOptions options) |
void |
addErrorListener(EventListener callback,
boolean useCapture) |
void |
addVersionchangeListener(EventListener callback) |
void |
addVersionchangeListener(EventListener callback,
AddEventListenerOptions options) |
void |
addVersionchangeListener(EventListener callback,
boolean useCapture) |
void |
close()
The connection is not actually closed until all transactions created using this connection are complete.
|
IDBObjectStore |
createObjectStore(java.lang.String name)
The method takes the name of the store as well as a parameter object that lets you define important optional properties.
|
IDBObjectStore |
createObjectStore(java.lang.String name,
IDBObjectStoreParameters options)
The method takes the name of the store as well as a parameter object that lets you define important optional properties.
|
void |
deleteObjectStore(java.lang.String name)
As with IDBDatabase.createObjectStore, this method can be called only within a versionchange transaction.
|
java.lang.String |
name()
A DOMString containing the name of the connected database.
|
DOMStringList |
objectStoreNames()
A DOMStringList containing a list of the names of the object stores currently in the connected database.
|
void |
removeAbortListener(EventListener callback) |
void |
removeAbortListener(EventListener callback,
boolean useCapture) |
void |
removeAbortListener(EventListener callback,
EventListenerOptions options) |
void |
removeCloseListener(EventListener callback) |
void |
removeCloseListener(EventListener callback,
boolean useCapture) |
void |
removeCloseListener(EventListener callback,
EventListenerOptions options) |
void |
removeErrorListener(EventListener callback) |
void |
removeErrorListener(EventListener callback,
boolean useCapture) |
void |
removeErrorListener(EventListener callback,
EventListenerOptions options) |
void |
removeVersionchangeListener(EventListener callback) |
void |
removeVersionchangeListener(EventListener callback,
boolean useCapture) |
void |
removeVersionchangeListener(EventListener callback,
EventListenerOptions options) |
IDBTransaction |
transaction(JsArray<java.lang.String> storeNames)
An IDBTransaction object.
|
IDBTransaction |
transaction(JsArray<java.lang.String> storeNames,
java.lang.String mode)
An IDBTransaction object.
|
IDBTransaction |
transaction(JsArray<java.lang.String> storeNames,
java.lang.String mode,
IDBTransactionOptions options)
An IDBTransaction object.
|
IDBTransaction |
transaction(java.lang.String storeNames)
An IDBTransaction object.
|
IDBTransaction |
transaction(java.lang.String[] storeNames)
An IDBTransaction object.
|
IDBTransaction |
transaction(java.lang.String[] storeNames,
java.lang.String mode)
An IDBTransaction object.
|
IDBTransaction |
transaction(java.lang.String[] storeNames,
java.lang.String mode,
IDBTransactionOptions options)
An IDBTransaction object.
|
IDBTransaction |
transaction(java.lang.String storeNames,
java.lang.String mode)
An IDBTransaction object.
|
IDBTransaction |
transaction(java.lang.String storeNames,
java.lang.String mode,
IDBTransactionOptions options)
An IDBTransaction object.
|
int |
version()
An integer containing the version of the connected database.
|
addEventListener, addEventListener, addEventListener, dispatchEvent, removeEventListener, removeEventListener, removeEventListenerassign, create, create, defineProperties, defineProperty, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyDescriptor, getOwnPropertyDescriptors, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toString_, valueOf_, values@Nullable public EventHandler onabort
@Nullable public EventHandler onclose
@Nullable public EventHandler onerror
@Nullable public EventHandler onversionchange
@JsProperty(name="name") @Nonnull public java.lang.String name()
@JsProperty(name="objectStoreNames") @Nonnull public DOMStringList objectStoreNames()
@JsProperty(name="version") public int version()
public void close()
@Nonnull public IDBObjectStore createObjectStore(@Nonnull java.lang.String name, @Nonnull IDBObjectStoreParameters options)
@Nonnull public IDBObjectStore createObjectStore(@Nonnull java.lang.String name)
public void deleteObjectStore(@Nonnull
java.lang.String name)
@Nonnull public IDBTransaction transaction(@Nonnull java.lang.String storeNames, @IDBTransactionMode @Nonnull java.lang.String mode, @Nonnull IDBTransactionOptions options)
@Nonnull public IDBTransaction transaction(@Nonnull JsArray<java.lang.String> storeNames, @IDBTransactionMode @Nonnull java.lang.String mode, @Nonnull IDBTransactionOptions options)
@Nonnull public IDBTransaction transaction(@Nonnull java.lang.String[] storeNames, @IDBTransactionMode @Nonnull java.lang.String mode, @Nonnull IDBTransactionOptions options)
@Nonnull public IDBTransaction transaction(@Nonnull java.lang.String storeNames, @IDBTransactionMode @Nonnull java.lang.String mode)
@Nonnull public IDBTransaction transaction(@Nonnull JsArray<java.lang.String> storeNames, @IDBTransactionMode @Nonnull java.lang.String mode)
@Nonnull public IDBTransaction transaction(@Nonnull java.lang.String[] storeNames, @IDBTransactionMode @Nonnull java.lang.String mode)
@Nonnull public IDBTransaction transaction(@Nonnull java.lang.String storeNames)
@Nonnull public IDBTransaction transaction(@Nonnull JsArray<java.lang.String> storeNames)
@Nonnull public IDBTransaction transaction(@Nonnull java.lang.String[] storeNames)
@JsOverlay
public final void addAbortListener(@Nonnull
EventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addAbortListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void addAbortListener(@Nonnull
EventListener callback)
@JsOverlay
public final void removeAbortListener(@Nonnull
EventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeAbortListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void removeAbortListener(@Nonnull
EventListener callback)
@JsOverlay
public final void addCloseListener(@Nonnull
EventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addCloseListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void addCloseListener(@Nonnull
EventListener callback)
@JsOverlay
public final void removeCloseListener(@Nonnull
EventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeCloseListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void removeCloseListener(@Nonnull
EventListener callback)
@JsOverlay
public final void addErrorListener(@Nonnull
EventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addErrorListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void addErrorListener(@Nonnull
EventListener callback)
@JsOverlay
public final void removeErrorListener(@Nonnull
EventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeErrorListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void removeErrorListener(@Nonnull
EventListener callback)
@JsOverlay
public final void addVersionchangeListener(@Nonnull
EventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addVersionchangeListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void addVersionchangeListener(@Nonnull
EventListener callback)
@JsOverlay
public final void removeVersionchangeListener(@Nonnull
EventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeVersionchangeListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void removeVersionchangeListener(@Nonnull
EventListener callback)