Class RecordDataStoreWrapper
publicRecordDataStoreWrapper provides encapsulated API access to the minimal
subset of the Store's functionality that cache (RecordData) implementations
should interact with. It is provided to the Store's createRecordDataFor
hook.
Cache implementations should not need more than this API provides.
This class cannot be directly instantiated.
disconnectRecord (identifier) public
Defined in ../../ember-data-types/q/record-data-store-wrapper.ts:93
- identifier
- StableRecordIdentifier
Signal to the store that the specified record may be considered fully removed from the cache. Generally this means that not only does no data exist for the identified resource, no known relationships still point to it either.
getSchemaDefinitionService public
Defined in ../../ember-data-types/q/record-data-store-wrapper.ts:39
Provides access to the SchemaDefinitionService instance for this Store instance.
The SchemaDefinitionService can be used to query for information about the schema of a resource.
hasRecord (identifier) Boolean public
Defined in ../../ember-data-types/q/record-data-store-wrapper.ts:122
- identifier
- returns
- Boolean
Use this method to determine if the Store has an instantiated record associated with an identifier.
notifyChange (identifier, namespace, key) public
Defined in ../../ember-data-types/q/record-data-store-wrapper.ts:198
- identifier
- StableRecordIdentifier
- namespace
- 'attributes' | 'relationships' | 'identity' | 'errors' | 'meta' | 'state'
- key
- String|undefined
Notify subscribers of the RecordNotificationManager that cache state has changed.
attributes
and relationships
do not require a key, but if one is specified it
is assumed to be the name of the attribute or relationship that has been updated.
No other namespaces currently expect the key
argument.
recordDataFor (identifier) RecordData public
Defined in ../../ember-data-types/q/record-data-store-wrapper.ts:161
- identifier
- StableRecordIdentifier
- returns
- RecordData
- the RecordData cache instance associated with the identifier
Used to retrieve the associated RecordData for a given identifier.
To generate a RecordData for a new client-side resource that does not
yet have an ID and place it in the new state, first create an identifier
via identifierCache.createIdentifierForNewRecord
Then once you have obtained the RecordData instance you should invoke
recordData.clientDidCreate
to ensure the cache entry is put into the
correct "newly created" state.
setRecordId (identifier;, id;) public
Defined in ../../ember-data-types/q/record-data-store-wrapper.ts:81
- identifier;
- StableRecordIdentifier
- id;
- String
Update the id
for the record corresponding to the identifier
This operation can only be done for records whose id
is null
.