Show:

Store that used in offline mode by default.

Methods

adapterFor

(
  • modelName
)
public

Returns an instance of the adapter for a given type. Offline adapters should have name with postfix '-offline'.

Parameters:

  • modelName String

    The name of the model type.

batchSelect

(
  • queries
)
Promise

A method to get array of models with batch request.

Parameters:

  • queries Query

    Array of Flexberry Query objects.

Returns:

Promise:

A promise that fulfilled with an array of query responses.

batchUpdate

(
  • models
)
Promise

Calls the save method on each passed model and returns a promise that is resolved by an array of saved models.

The array which fulfilled the promise may contain the following values:

  • same model object - for created, updated or unaltered records.
  • null - for deleted records.

Parameters:

Returns:

Promise:

A promise that fulfilled with an array of models in the new state.

deleteRecord

(
  • modelName
  • filter
)

Delete all record from the current store.

Parameters:

findAll

(
  • modelName
  • [options]
)
DS.AdapterPopulatedRecordArray public

Finds the records for the given model type.

See findAll for details.

Parameters:

  • modelName String

    The name of the model type.

  • [options] Object optional

    Options.

    • projection String

      Projection name.

Returns:

DS.AdapterPopulatedRecordArray:

Records promise.

findRecord

(
  • modelName
  • id
  • [options]
)
Promise public

Returns a record for a given type and id combination.

See findRecord for details.

Parameters:

  • modelName String

    The name of the model type.

  • id String | Integer

    Record ID.

  • [options] Object optional

    Options.

    • projection String

      Projection name.

Returns:

Promise:

Record promise.

init

()

Initializing instance. More info.

query

(
  • modelName
  • query
)
Promise public

This method delegates a query to the adapter.

See query for details.

Parameters:

  • modelName String

    The name of the model type.

  • query Object

    An opaque query to be used by the adapter.

    • [projection] String optional

      Projection name.

Returns:

Promise:

A promise, which is resolved with a RecordArray once the server returns.

queryRecord

(
  • modelName
  • query
)
Promise public

This method delegates a query to the adapter.

See queryRecord for details.

Parameters:

  • modelName String

    The name of the model type.

  • query Object

    An opaque query to be used by the adapter.

    • [projection] String optional

      Projection name.

Returns:

Promise:

A promise, which is resolved with a DS.RecordObject once the server returns.

serializerFor

(
  • modelName
)
public

Returns an instance of the serializer for a given type. Offline serializers should have name with postfix '-offline'.

Parameters:

  • modelName String

    The name of the model type.

Properties

dbName

String

Database name for IndexedDB.

Default: 'ember-flexberry-data'