This Ember-Data adapter will fetch and save all data to/from IndexedDB.

Show:
_logDuration
(
  • str
  • isEnd
)
private

This function is used to log durations of operations to the console, if _shouldLogDurations is set.

Parameters:

_normalizeArray
(
  • records
)
Object
private

This is used to normalize the response of IndexedDB for array responses.

Parameters:

Returns:

_normalizeSingle
(
  • record
)
Object
private

This is used to normalize a single record response.

Parameters:

Returns:

_save
(
  • store
  • type
  • snapshot
)
Promise
private

This function is called under the hood by both createRecord and updateRecord.

Parameters:

Returns:

createRecord
(
  • store
  • type
  • snapshot
)
Promise
public

Create a new record in IndexedDB.

Parameters:

Returns:

deleteRecord
(
  • store
  • type
  • snapshot
)
Promise
public

Delete a record from IndexedDB.

Parameters:

Returns:

findAll
(
  • store
  • type
)
Promise
public

Fetch all records of a given type from IndexedDB.

Parameters:

Returns:

findMany
(
  • store
  • type
  • ids
)
Promise
public

Find many records for a given type by multiple IDs.

Parameters:

Returns:

findRecord
(
  • store
  • type
  • id
)
Promise
public

Find a record of a given type & ID from IndexedDB.

Parameters:

Returns:

generateIdForRecord () String protected

This function will generate a GUID to be used in IndexedDB.

Returns:

query
(
  • store
  • type
  • query
)
Promise
public

Query a type from IndexedDB. This will try to use real indices where possible.

Parameters:

Returns:

queryRecord
(
  • store
  • type
  • query
)
Promise
public

Query a single item from IndexedDB. This will try to use real indices where possible.

Parameters:

Returns:

updateRecord
(
  • store
  • type
  • snapshot
)
Promise
public

Update a given record in IndexedDB.

Parameters:

Returns:

_shouldLogDurations

Boolean private

Set this to true to log durations of IndexedDB operations to the console.


Default: false

coalesceFindRequests

Boolean protected

Coalesce all find requests.


Default: true