DS#ejectAll
DS#ejectAll(resourceName[, params][, options])
Eject all matching items of the specified type from the data store. Ejection only removes items from the data store and does not attempt to destroy items via an adapter.
Returns any ejected items.
Arguments
name | type | description |
---|---|---|
resourceName | string | The name of the resource to use. Unnecessary if using the resource directly. |
params | object | Query parameters for selecting which items to eject. Default: {} . See Query Syntax for how to filter, sort, limit and offset. |
options | object | Configuration options. |
options.notify | boolean | Whether to call the beforeEject and afterEject hooks and emit the DS.eject event. Default: true . |
Live Demo
Method Variants
You can call
DS#ejectAll
multiple ways:
DS#ejectAll(resourceName[, params][, options])
Resource#ejectAll([params][, options])
- Where Resource was created byDS#defineResource
Need help?
Want more examples or have a question? Ask on the Slack channel or post on the mailing list then we'll get your question answered and probably update this wiki.
Updated less than a minute ago