W3cubDocs

/Ember.js 4

Class RecordDataManager

public
Defined in: ../packages/store/addon/-private/managers/record-data-manager.ts:16
Module: @ember-data/store

clientDidCreate (identifier, options) public

Module: @ember-data/store
identifier
options

[LIFECYLCE] Signal to the cache that a new record has been instantiated on the client

It returns properties from options that should be set on the record during the create process. This return value behavior is deprecated.

commitWasRejected (identifier, errors) public

Module: @ember-data/store
identifier
errors

[LIFECYCLE] Signals to the cache that a resource was update via a save transaction failed.

didCommit (identifier, data) public

Module: @ember-data/store
identifier
data

[LIFECYCLE] Signals to the cache that a resource was successfully updated as part of a save transaction.

getAttr (identifier, propertyName) Unknown public

Module: @ember-data/store
identifier
propertyName
returns
Unknown

Retrieve the data for an attribute from the cache

getErrors (identifier) public

Module: @ember-data/store
identifier
returns

Query the cache for any validation errors applicable to the given resource.

getRelationship (identifier, propertyName) public

Module: @ember-data/store
identifier
propertyName
returns
resource relationship object

Query the cache for the current state of a relationship property

hasChangedAttrs (identifier) Boolean public

Module: @ember-data/store
identifier
returns
Boolean

Query the cache for whether any mutated attributes exist

isDeleted (identifier) Boolean public

Module: @ember-data/store
identifier
returns
Boolean

Query the cache for whether a given resource is marked as deleted (but not necessarily persisted yet).

isDeletionCommitted (identifier) Boolean public

Module: @ember-data/store
identifier
returns
Boolean

Query the cache for whether a given resource has been deleted and that deletion has also been persisted.

isEmpty (identifier) Boolean public

Module: @ember-data/store
identifier
returns
Boolean

Query the cache for whether a given resource has any available data

isNew (identifier) Boolean public

Module: @ember-data/store
identifier
returns
Boolean

Query the cache for whether a given resource was created locally and not yet persisted.

pushData (identifier, data, hasRecord) Void | string[] public

Module: @ember-data/store
identifier
data
hasRecord
returns
Void | string[]
if `hasRecord` is true then calculated key changes should be returned

Push resource data from a remote source into the cache for this identifier

rollbackAttrs (identifier) public

Module: @ember-data/store
identifier
returns
the names of attributes that were restored

Tell the cache to discard any uncommitted mutations to attributes

setAttr (identifier, propertyName, value) public

Module: @ember-data/store
identifier
propertyName
value

Mutate the data for an attribute in the cache

setIsDeleted (identifier, isDeleted) public

Module: @ember-data/store
identifier
isDeleted

Update the cache state for the given resource to be marked as locally deleted, or remove such a mark.

sync (op) Void public

Module: @ember-data/store
op
the operation to perform
returns
Void

Perform an operation on the cache to update the remote state.

Note: currently the only valid operation is a MergeOperation which occurs when a collision of identifiers is detected.

unloadRecord (identifier) public

Module: @ember-data/store
identifier

[LIFECYCLE] Signals to the cache that all data for a resource should be cleared.

update (operation) public

Module: @ember-data/store
operation

Update resource data with a local mutation. Currently supports operations on relationships only.

willCommit (identifier) public

Module: @ember-data/store
identifier

[LIFECYCLE] Signals to the cache that a resource will be part of a save transaction.

© 2022 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License.
https://api.emberjs.com/ember-data/4.9/classes/RecordDataManager/methods