load_bulk

classmethod EquationPluginModel.load_bulk(bulk_data, parent=None, keep_ids=False)

Loads a list/dictionary structure to the tree.

Parameters
  • bulk_data

    The data that will be loaded, the structure is a list of dictionaries with 2 keys:

    • data: will store arguments that will be passed for object creation, and

    • children: a list of dictionaries, each one has it’s own data and children keys (a recursive structure)

  • parent – The node that will receive the structure as children, if not specified the first level of the structure will be loaded as root nodes

  • keep_ids – If enabled, loads the nodes with the same primary keys that are given in the structure. Will error if there are nodes without primary key info or if the primary keys are already used.

Returns

A list of the added node ids.