Properties:
| Name | Type | Description |
|---|---|---|
sid |
String | Map unique id |
uniqueName |
String | Map unique name |
Fires:
Methods
-
get(key)
-
Parameters:
Name Type Description keyString 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 argsObject Arguments for query Properties
Name Type Description fromString Item, which should be used as an anchor. If undefined, starts from the beginning or end depending on args.order pageSizeNumber Result page size orderString Order of results, should be 'asc' or 'desc' Returns:
- Type
- Promise.<Paginator>
-
mutate(Key, Mutator)
-
Parameters:
Name Type Description KeyString Item key MutatorMap~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 keyString Key identifier valueObject Value to set Returns:
- Type
- Promise.<Item>
-
update(key, update)
-
Parameters:
Name Type Description keyString Item key updateObject 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 dataObject 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