Properties:
Name | Type | Description |
---|---|---|
sid |
String | Map unique id |
uniqueName |
String | Map unique name |
Fires:
Methods
-
get(key)
-
Parameters:
Name Type Description key
String String identifier of entity in a map Returns:
- Type
- Promise.<Item>
-
getItems(args)
-
Get a list of items from the Map
Parameters:
Name Type Description args
Object Arguments for query Properties
Name Type Description from
String Item, which should be used as an anchor. If undefined, starts from the beginning or end depending on args.order pageSize
Number Result page size order
String Order of results, should be 'asc' or 'desc' Returns:
- Type
- Promise.<Paginator>
-
mutate(Key, Mutator)
-
Parameters:
Name Type Description Key
String Item key Mutator
Map~Mutator Function performing value mutation Returns:
- Type
- Promise.<Item>
-
remove()
-
Delete an entity by given key
Returns:
- Type
- Promise
-
removeMap()
-
Delete map from server. It will be impossible to restore it.
Returns:
Promise to delete the collection- Type
- Promise
-
set(key, value)
-
Set key and value pair in map
Parameters:
Name Type Description key
String Key identifier value
Object Value to set Returns:
- Type
- Promise.<Item>
-
update(key, update)
-
Parameters:
Name Type Description key
String Item key update
Object Set of fields to update Returns:
Result data- Type
- Promise.<Item>
Type Definitions
-
Mutator(data)
-
Applies a transformation to the item value
Parameters:
Name Type Description data
Object current value of an item Returns:
Modified data for an item- Type
- Object
Events
-
collectionRemoved
-
Fired when Map is removed from server
-
collectionRemovedRemotely
-
Fired when Map is removed from server by remote actor
-
itemAdded
-
Fired when item is added to the Map
Type: Item
-
itemAddedRemotely
-
Fired when item is added to the Map by remote actor
Type: Item
-
itemRemoved
-
Fired when item is removed from the Map
Type: String
-
itemRemovedRemotely
-
Fired when item is removed from the Map by remote actor
Type: String
-
itemUpdated
-
Fired when item is updated
Type: Item
-
itemUpdatedRemotely
-
Fired when item is updated by remote actor
Type: Item