Used when updating / deleting multiple nodes in a graph. Provides a cache to ensure that each node is only loaded once. Keeps track of deletedNodes and updatedNodes which can be saved to the database.

Inheritors

Properties

Link copied to clipboard
abstract val cache: NodeCache

Cache used to ensure that only one instance of each Node is loaded by the algorithm

Link copied to clipboard
abstract val deletedNodes: MutableSet<Node>

Nodes which should be deleted

Link copied to clipboard
abstract val internalUpdatedNodes: MutableSet<Node>

Nodes which are updated and need to be saved This may contain nodes also present in deletedNodes

Link copied to clipboard
open val updatedNodes: Set<Node>

Nodes which are updated and need to be saved Does not include any deleted nodes

Functions

Link copied to clipboard
open suspend fun save(nodeRepository: NodeRepository)
open suspend fun <T : Node> save(node: T, nodeRepository: NodeRepository): T

Deletes all deletedNodes and saves all updatedNodes to the database