Skip to main content
Version: 0.17

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​

NameType
typestring
keysDict<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​

NameType
typestring
keyNamestring
idValuestring

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​

NameType
typestring
keyNamestring
keyValuestring

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​

NameType
recordInitializedRecord | 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

Defined in​

packages/@orbit/records/src/record-key-map.ts:18