Packages

c

org.scalajs.dom

IDBObjectStore

class IDBObjectStore extends Object with IDBStoreLike[IDBObjectStore]

The IDBObjectStore interface of the IndexedDB API represents an object store in a database. Records within an object store are sorted according to their keys. This sorting enables fast insertion, look-up, and ordered retrieval.

Annotations
@JSType() @native() @JSGlobal()
Linear Supertypes
IDBStoreLike[IDBObjectStore], Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. IDBObjectStore
  2. IDBStoreLike
  3. Object
  4. Any
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new IDBObjectStore()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def add(value: IDBValue, key: IDBKey = js.native): IDBRequest[IDBObjectStore, IDBKey]

    To determine if the add operation has completed successfully, listen for the transaction’s complete event in addition to the IDBObjectStore.add request’s success event, because the transaction may still fail after the success event fires.

    To determine if the add operation has completed successfully, listen for the transaction’s complete event in addition to the IDBObjectStore.add request’s success event, because the transaction may still fail after the success event fires. In other words, the success event is only triggered when the transaction has been successfully queued.

    returns

    IDBRequest with the key as the target value

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clear(): IDBRequest[IDBObjectStore, Unit]

    Clearing an object store consists of removing all records from the object store and removing all records in indexes that reference the object store.

  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  8. def count(query: |[IDBKey, IDBKeyRange] = js.native): IDBRequest[IDBObjectStore, Double]
    Definition Classes
    IDBStoreLike
  9. def createIndex(name: String, keyPath: IDBKeyPath, optionalParameters: IDBCreateIndexOptions = js.native): IDBIndex

    Note that this method must be called only from a VersionChange transaction mode callback.

  10. def delete(key: |[IDBKey, IDBKeyRange]): IDBRequest[IDBObjectStore, Unit]

    Returns an IDBRequest object, and, in a separate thread, deletes the specified record or records.

    Returns an IDBRequest object, and, in a separate thread, deletes the specified record or records.

    Either a key or an IDBKeyRange can be passed, allowing one or multiple records to be deleted from a store. To delete all records in a store, use clear.

    Bear in mind that if you are using an IDBCursor, you can use the IDBCursor.delete method to more efficiently delete the current record — without having to explicitly look up the record's key.

  11. def deleteIndex(indexName: String): Unit

    Note that this method must be called only from a VersionChange transaction mode callback.

    Note that this method must be called only from a VersionChange transaction mode callback. Note that this method synchronously modifies the IDBObjectStore.indexNames property.

  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def get(key: |[IDBKey, IDBKeyRange]): IDBRequest[IDBObjectStore, IDBValue]

    Returns an IDBRequest object, and, in a separate thread, returns the object store selected by the specified key.

    Returns an IDBRequest object, and, in a separate thread, returns the object store selected by the specified key. This is for retrieving specific records from an object store.

    Note: This method produces the same result for: a) a record that doesn't exist in the database and b) a record that has an undefined value. To tell these situations apart, call the openCursor method with the same key. That method provides a cursor if the record exists, and no cursor if it does not.

    Definition Classes
    IDBStoreLike
  16. def getAll(query: UndefOr[|[IDBKeyRange, IDBKey]] = js.native, count: UndefOr[Double] = js.native): IDBRequest[IDBObjectStore, Array[IDBValue]]

    Returns an IDBRequest object containing all objects in the object store matching the specified parameter or all objects in the store if no parameters are given.

    Returns an IDBRequest object containing all objects in the object store matching the specified parameter or all objects in the store if no parameters are given.

    If a value is successfully found, then a structured clone of it is created and set as the result of the request object.

    This method produces the same result for:

    • a record that doesn't exist in the database
    • a record that has an undefined value

    To tell these situations apart, you either call

    • the openCursor method with the same key. That method provides a cursor if the record exists, and no cursor if it does not.
    • the count method with the same key, which will return 1 if the row exists and 0 if it doesn't.
    Definition Classes
    IDBStoreLike
  17. def getAllKeys(query: UndefOr[|[IDBKeyRange, IDBKey]] = js.native, count: UndefOr[Double] = js.native): IDBRequest[IDBObjectStore, Array[IDBKey]]

    Returns an IDBRequest object retrieves record keys for all objects in the object store matching the specified parameter or all objects in the store if no parameters are given.

    Returns an IDBRequest object retrieves record keys for all objects in the object store matching the specified parameter or all objects in the store if no parameters are given.

    If a value is successfully found, then a structured clone of it is created and set as the result of the request object.

    This method produces the same result for:

    • a record that doesn't exist in the database
    • a record that has an undefined value

    To tell these situations apart, you need to call the openCursor method with the same key. That method provides a cursor if the record exists, and no cursor if it does not.

    Definition Classes
    IDBStoreLike
  18. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. def getKey(key: IDBKey): IDBRequest[IDBObjectStore, UndefOr[IDBKey]]

    Returns an IDBRequest object, and, in a separate thread, returns the key selected by the specified query.

    Returns an IDBRequest object, and, in a separate thread, returns the key selected by the specified query. This is for retrieving specific records from an object store.

    Definition Classes
    IDBStoreLike
  20. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. def index(name: String): IDBIndex

    This method may raise a DOMException of one of the following types:

  23. def indexNames: DOMStringList

    A list of the names of indexes on objects in this object store.

  24. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  25. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  26. def keyPath: IDBKeyPath

    The key path of this object store.

    The key path of this object store. If this attribute is null, the application must provide a key for each modification operation.

    Definition Classes
    IDBStoreLike
  27. def name: String
    Definition Classes
    IDBStoreLike
  28. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  30. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  31. def openCursor(range: UndefOr[|[IDBKeyRange, IDBKey]] = js.native, direction: UndefOr[IDBCursorDirection] = js.native): IDBRequest[IDBObjectStore, IDBCursorWithValue[IDBObjectStore]]

    The method sets the position of the cursor to the appropriate record, based on the specified direction.

    The method sets the position of the cursor to the appropriate record, based on the specified direction.

    returns

    IDBRequest with the target value being a new cursor or null.

    Definition Classes
    IDBStoreLike
  32. def openKeyCursor(range: UndefOr[|[IDBKeyRange, IDBKey]] = js.native, direction: UndefOr[IDBCursorDirection] = js.native): IDBRequest[IDBObjectStore, IDBCursor[IDBObjectStore]]

    The method sets the position of the cursor to the appropriate key, based on the specified direction.

    The method sets the position of the cursor to the appropriate key, based on the specified direction.

    returns

    IDBRequest with the target value being a new cursor or null.

    Definition Classes
    IDBStoreLike
  33. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  34. def put(value: IDBValue, key: IDBKey = js.native): IDBRequest[IDBObjectStore, IDBKey]

    If the record is successfully stored, then a success event is fired on the returned request object with the result set to the key for the stored record, and the transaction set to the transaction in which this object store is opened.

    If the record is successfully stored, then a success event is fired on the returned request object with the result set to the key for the stored record, and the transaction set to the transaction in which this object store is opened.

    returns

    IDBRequest with the key as the target value

  35. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  36. def toLocaleString(): String
    Definition Classes
    Object
  37. def toString(): String
    Definition Classes
    AnyRef → Any
  38. def transaction: IDBTransaction

    The name of the transaction to which this object store belongs.

  39. def valueOf(): Any
    Definition Classes
    Object
  40. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from IDBStoreLike[IDBObjectStore]

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped