SpreadGraph

SpreadGraph

new SpreadGraph(collection, fields, config)

Parameters:
Name Type Description
collection

A pointer to the collection dannymineobhodimye daapteru to work with the graph. This may be a connection to the SQL database and table name, for example, or a collection of Mongo.

fields Object

Comparison of the data in the collection of data in the graph. It is necessary for the adapter.

config Object

Additional config.

Properties
Name Type Description
constantField String

Constant field in graph

variableField String

Spreadable field in graph

Source:

Methods

_spreadingHandler(prevSpreadLinkopt, pathGraphopt, pathLinkopt, newSpreadLink, contextopt, callbackopt)

Default spreading handler. If spread specified link allowed, callback it link, else callback undefined.

Parameters:
Name Type Attributes Description
prevSpreadLink Object <optional>
pathGraph PathGraph <optional>
pathLink Object <optional>
newSpreadLink Object
context Object <optional>
callback SpreadGraph~_spreadingHandlerCallback <optional>
Source:

_unspreadingHandler(spreadLink, contextopt, callbackopt)

Default unspreading handler. If unspread specified link allowed, callback it link, else callback undefined. It called in cases of dispute. When respread, if this method not replaced, will be respreaded all spread links.

Parameters:
Name Type Attributes Description
spreadLink Object
context Object <optional>
callback SpreadGraph~_unspreadingHandlerCallback <optional>
Source:

insert()

Parent insert with parser of context.process.

Source:

remove()

The method is strictly designed so that the class inherits from ExistedGraph. Adds to process field custom value from context.

Source:

Type Definitions

_spreadingHandlerCallback(newSpreadLinkopt)

Responce from _spreadingHandler method.

Parameters:
Name Type Attributes Description
newSpreadLink Object <optional>
Source:

_unspreadingHandlerCallback(premissionopt)

Responce from _unspreadingHandler method.

Parameters:
Name Type Attributes Default Description
premission Boolean <optional>
true
Source: