API Docs for: v3.9.1
Show:

IdentityMap Class

IdentityMap is a custom storage map for records by modelName used by DS.Store.

Item Index

Methods

clear

()

Clears the contents of all known RecordMaps, but does not remove the InternalModelMap instances.

diffArray

(
  • oldArray
  • newArray
)
Hash private

Parameters:

  • oldArray Array

    the old array

  • newArray Array

    the new array

Returns:

Hash:

{ firstChangeIndex: , // null if no change addedCount: , // 0 if no change removedCount: // 0 if no change }

retrieve

(
  • modelName
)
InternalModelMap

Retrieves the InternalModelMap for a given modelName, creating one if one did not already exist. This is similar to getWithDefault or get on a MapWithDefault

Parameters:

  • modelName Object

    a previously normalized modelName

Returns:

InternalModelMap:

the InternalModelMap for the given modelName