GraphStoreMemory Module
API > [GraphStoreMemory Module]
Module
Classes
Functions
Functions
deepFind
► deepFind(obj: any
, path: string
): any
Defined in GraphStoreMemory.ts:275
Private helper function used by MemoryDatabase
Returns the part of an object represent by the given path
For example { level1: { level2: { level3: "result" }, level2b: { level3: "not returned" }}}, "level1/level2" returns { level3: "result" }
Parameters:
Param | Type | Description |
---|---|---|
obj | any | the JSON object to navigate |
path | string | the string representation of the path to return |
Returns: any
the node of the sub-object represented by the path
deepUpdate
► deepUpdate(obj: any
, path: string
, update_value: any
): boolean
Defined in GraphStoreMemory.ts:341
Private helper function used by MemoryDatabase
Creates or updates the part of an object represent by the given path
Parameters:
Param | Type | Description |
---|---|---|
obj | any | the JSON object to navigate |
path | string | the string representation of the path to update |
update_value | any | the JSON object to create/update at the given location |
Returns: boolean
true if the item was create, false if was updated
objectToSnapshotArray
► objectToSnapshotArray(objectToMap: any
): IFireDatabaseSnapshot[]
Defined in GraphStoreMemory.ts:387
Private helper function used by MemoryDatabase
Converts an object to an array of sub-objects and returns as an array of {key, val()} objects
Parameters:
Param | Type | Description |
---|---|---|
objectToMap | any | the JSON object to convert |
Returns: IFireDatabaseSnapshot[] An array of {key, val()} objects
subsetFind
► subsetFind(obj: any
, path: string
): any
Defined in GraphStoreMemory.ts:307
Private helper function used by MemoryDatabase
Returns the part of an object represent by the given path with the root to this node added back in to the result
For example { level1: { level2: { level3: "result" }, level2b: { level3: "not returned" }}}, "level1/level2" returns { level1: { level2: { level3: "result" }}}
Parameters:
Param | Type | Description |
---|---|---|
obj | any | the JSON object to navigate |
path | string | the string representation of the path to return |
Returns: any
the subset of the entire object represented by this path