Class: RecordKeyMap
Maintains a map between records' ids and keys.
Constructors​
constructor​
• new RecordKeyMap()
Defined in​
packages/@orbit/records/src/record-key-map.ts:11
Methods​
idFromKeys​
â–¸ idFromKeys(type
, keys
): undefined
| string
Given a record, find the cached id if it exists.
Parameters​
Name | Type |
---|---|
type | string |
keys | Dict <string > |
Returns​
undefined
| string
Defined in​
packages/@orbit/records/src/record-key-map.ts:59
idToKey​
â–¸ idToKey(type
, keyName
, idValue
): undefined
| string
Return a key value given a model type, key name, and id.
Parameters​
Name | Type |
---|---|
type | string |
keyName | string |
idValue | string |
Returns​
undefined
| string
Defined in​
packages/@orbit/records/src/record-key-map.ts:26
keyToId​
â–¸ keyToId(type
, keyName
, keyValue
): undefined
| string
Return an id value given a model type, key name, and key value.
Parameters​
Name | Type |
---|---|
type | string |
keyName | string |
keyValue | string |
Returns​
undefined
| string
Defined in​
packages/@orbit/records/src/record-key-map.ts:33
pushRecord​
â–¸ pushRecord(record
): void
Store the id and key values of a record in this key map.
Parameters​
Name | Type |
---|---|
record | InitializedRecord | UninitializedRecord |
Returns​
void
Defined in​
packages/@orbit/records/src/record-key-map.ts:40
reset​
â–¸ reset(): void
Resets the contents of the key map.
Returns​
void